From: Ilia Alshanetsky Date: Thu, 30 Sep 2004 01:23:34 +0000 (+0000) Subject: MFH: Fixed bug #30276 (Possible crash in ctype_digit on large numbers). X-Git-Tag: php-5.0.3RC1~193 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7dd408c7e5a1fb75a9dbd9947937e0028e19ecc0;p=php MFH: Fixed bug #30276 (Possible crash in ctype_digit on large numbers). --- diff --git a/NEWS b/NEWS index 9d05674e75..ce63fc9034 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2004, PHP 5.0.3 +- Fixed bug #30276 (Possible crash in ctype_digit on large numbers). (Ilia) - Fixed bug #30224 (Sybase date strings are sometimes not null terminated). (Ilia) - Fixed bug #30147 (OO sqlite_fetch_object did not reset error handler). (Wez) diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index b16324042d..78f6d293e3 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -99,7 +99,7 @@ PHP_MINFO_FUNCTION(ctype) case IS_LONG: \ if (Z_LVAL_P(c) <= 255 && Z_LVAL_P(c) >= 0) { \ RETURN_BOOL(iswhat(Z_LVAL_P(c))); \ - } else if (Z_LVAL_P(c) >= -128) { \ + } else if (Z_LVAL_P(c) >= -128 && Z_LVAL_P(c) < 0) { \ RETURN_BOOL(iswhat(Z_LVAL_P(c) + 256)); \ } \ SEPARATE_ZVAL(&c); \