2008-06-29
2008-06-29 21:08:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
3e9918a707f9b3dac03dd5c52d494cb090f1fcc6
(5 lines)
(+3/-2)
[
Show
| Annotate
]
Branch: 7.9
fixed bug in check_string().
Rev: src/stralloc.c:1.225
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: stralloc.c,v 1.224 2008/06/29 17:56:06 nilsson Exp $
+ || $Id: stralloc.c,v 1.225 2008/06/29 21:08:14 grubba Exp $
*/
#include "global.h"
1196: Inside #if defined(PIKE_DEBUG)
ptrdiff_t i;
p_wchar2 *str = STR2 (s);
for (i = 0; i < s->len; i++)
- if (str[i] > 0xffff)
+ if ((str[i] > 0xffff) || (str[i] < 0))
goto size_shift_check_done;
Pike_fatal ("Shared string is too wide.\n");
}