From: Ilia Alshanetsky Date: Thu, 30 Sep 2004 01:22:56 +0000 (+0000) Subject: Fixed bug #30276 (Possible crash in ctype_digit on large numbers). X-Git-Tag: PRE_NEW_VM_GEN_PATCH~125 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7cd1d708faf23e6ee4b3f14af05da12ec5b902b;p=php Fixed bug #30276 (Possible crash in ctype_digit on large numbers). --- 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); \