From f3f7b6242d2dab1d25785a5145a4f5c14aac38ca Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 20 Jul 2004 01:03:16 +0000 Subject: [PATCH] Fixed bug #29226 (ctype_* functions missing validation of numeric string representations). --- ext/ctype/ctype.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index 0e7e4699bd..db88978eb5 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -97,7 +97,11 @@ PHP_MINFO_FUNCTION(ctype) return; \ switch (Z_TYPE_P(c)) { \ case IS_LONG: \ - RETURN_BOOL(iswhat(Z_LVAL_P(c))); \ + if (Z_LVAL_P(c) < 255 && Z_LVAL_P(c) > -127) { \ + RETURN_BOOL(iswhat(Z_LVAL_P(c))); \ + } \ + SEPARATE_ZVAL(&c); \ + convert_to_string(c); \ case IS_STRING: \ { \ char *p; \ -- 2.50.1