From: Moriyoshi Koizumi Date: Mon, 18 Aug 2008 03:26:40 +0000 (+0000) Subject: - MFH: beware of signedness X-Git-Tag: php-5.2.7RC1~102 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6d8afbca872b95594c80a01c4e02c92e5d2b35b1;p=php - MFH: beware of signedness --- diff --git a/ext/standard/html.c b/ext/standard/html.c index 386a63fe2e..8b9a53dbb3 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -1203,21 +1203,21 @@ encode_amp: if (*s == 'x' || *s == 'X') { s++; while (s < e) { - if (!isxdigit(*s++)) { + if (!isxdigit((int)*(unsigned char *)s++)) { goto encode_amp; } } /* Dec (Z)*/ } else { while (s < e) { - if (!isdigit(*s++)) { + if (!isdigit((int)*(unsigned char *)s++)) { goto encode_amp; } } } } else { /* text entities */ while (s < e) { - if (!isalnum(*s++)) { + if (!isalnum((int)*(unsigned char *)s++)) { goto encode_amp; } }