]> granicus.if.org Git - php/commitdiff
Fixed bug #30276 (Possible crash in ctype_digit on large numbers).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 30 Sep 2004 01:22:56 +0000 (01:22 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 30 Sep 2004 01:22:56 +0000 (01:22 +0000)
ext/ctype/ctype.c

index b16324042dd5299cfdcaa06fe17d2cde0c6bc4bd..78f6d293e3b7c8c68bd960e9d19480869c1707bd 100644 (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);      \