From 467caa4307c254c9336a31783b2aab55f87e0bf1 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Tue, 20 Jul 2004 01:03:18 +0000 Subject: [PATCH] MFH: 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.40.0