Fixed bug #30276 (Possible crash in ctype_digit on large numbers).

This commit is contained in:
Ilia Alshanetsky 2004-09-30 01:22:56 +00:00
parent 464ebb7843
commit c7cd1d708f

View File

@ -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); \