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