From f3313b21b6451a3bee757c3a04348f2446a4fad7 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 30 Sep 2004 01:24:03 +0000 Subject: [PATCH] MFH: Fixed bug #30276 (Possible crash in ctype_digit on large numbers). --- NEWS | 1 + ext/ctype/ctype.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 37badf8ff3..fa8964448b 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ PHP 4 NEWS ?? ??? 2004, Version 4.3.10 - Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick) - Fixed potential problems with unserializing invalid serialize data. (Marcus) +- 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 #30057 (did not detect IPV6 on FreeBSD 4.1). (Wez) diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index 8336283a42..5f5f83f754 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); \ -- 2.40.0