Branch: Tag:

2004-04-30

2004-04-30 20:54:55 by Martin Nilsson <mani@lysator.liu.se>

Check the C stack size in String.Replace

Rev: src/builtin.cmod:1.158

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: builtin.cmod,v 1.157 2004/04/29 23:54:17 nilsson Exp $ + || $Id: builtin.cmod,v 1.158 2004/04/30 20:54:55 nilsson Exp $   */      #include "global.h"
2009:    INT32 c,match=-1;    ptrdiff_t tmp;    +  check_c_stack(2048); +     while(a<b)    {    c=(a+b)/2;
2076:    int *set_end = THIS->set_end;    struct tupel *v = THIS->v;    int num = THIS->sz; +  ONERROR uwp;       if (!num) {    add_ref(str);
2083:    }       init_string_builder(&ret,str->size_shift); +  SET_ONERROR(uwp, free_string_builder, &ret);       for(s=0;length > 0;)    {
2123:    length--;    }    +  UNSET_ONERROR(uwp); +     RETURN finish_string_builder(&ret);    }