Browse Source

- MFH: beware of signedness

PECL
Moriyoshi Koizumi 18 years ago
parent
commit
0699894884
  1. 6
      ext/standard/html.c

6
ext/standard/html.c

@ -1198,21 +1198,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 (&#90;)*/
} 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;
}
}

Loading…
Cancel
Save