diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-07-20 01:03:16 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-07-20 01:03:16 +0000 |
commit | f3f7b6242d2dab1d25785a5145a4f5c14aac38ca (patch) | |
tree | b2b037d86920572eddc10e0e49334c635e82de41 /ext/ctype | |
parent | 6b2e7f941a98622ac64cd192e1f9596e518df835 (diff) | |
download | php-git-f3f7b6242d2dab1d25785a5145a4f5c14aac38ca.tar.gz |
Fixed bug #29226 (ctype_* functions missing validation of numeric string
representations).
Diffstat (limited to 'ext/ctype')
-rw-r--r-- | ext/ctype/ctype.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; \ |