cvs: php-src(PHP_5_2) /ext/standard html.c
| From: | Moriyoshi Koizumi | Date: | Mon, 18 Aug 2008 03:26:40 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/standard html.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-52459@lists.php.net to get a copy of this message | ||
moriyoshi Mon Aug 18 03:26:40 2008 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard html.c
Log:
- MFH: beware of signedness
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/html.c?r1=1.111.2.2.2.21&r2=1.111.2.2.2.22&diff_format=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.111.2.2.2.21 php-src/ext/standard/html.c:1.111.2.2.2.22
--- php-src/ext/standard/html.c:1.111.2.2.2.21 Sun Aug 10 13:26:25 2008
+++ php-src/ext/standard/html.c Mon Aug 18 03:26:40 2008
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.c,v 1.111.2.2.2.21 2008/08/10 13:26:25 lbarnaud Exp $ */
+/* $Id: html.c,v 1.111.2.2.2.22 2008/08/18 03:26:40 moriyoshi Exp $ */
/*
* HTML entity resources:
@@ -1203,21 +1203,21 @@
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;
}
}