Branch: Tag:

2010-08-16

2010-08-16 19:00:19 by Martin Stjernholm <mast@lysator.liu.se>

Don't segfault if the regexp matcher runs out of C stack.

Problem observed by Andreas Pettersson (lyslyskom 18619652).

Rev: src/modules/Regexp/pike_regexp.c:1.28

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_regexp.c,v 1.27 2009/08/12 15:29:04 grubba Exp $ + || $Id: pike_regexp.c,v 1.28 2010/08/16 19:00:19 mast Exp $   */      /*
72:   #include "pike_regexp.h"   #include "pike_memory.h"   #include "pike_error.h" + #include "interpret.h"      #undef NOTHING   
879:    register char *scan; /* Current node. */    char *nxt; /* nxt node. */    +  check_c_stack (4 * sizeof (void *)); +     scan = prog;   #ifdef PIKE_DEBUG    if (scan != (char *)NULL && regnarrate)