mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-23 02:50:08 +03:00
nanohttp: Avoid ctype(3) misuse.
fix https://gitlab.gnome.org/GNOME/libxml2/-/issues/780
This commit is contained in:
parent
1d009fe35d
commit
b45a0f0eca
@ -1257,7 +1257,8 @@ xmlNanoHTTPHostnameMatch(const char *pattern, const char *hostname) {
|
||||
|
||||
for (; idx_pattern >= 0 && idx_hostname >= 0;
|
||||
--idx_pattern, --idx_hostname) {
|
||||
if (tolower(pattern_start[idx_pattern]) != tolower(hostname[idx_hostname]))
|
||||
if (tolower((unsigned char)pattern_start[idx_pattern]) !=
|
||||
tolower((unsigned char)hostname[idx_hostname]))
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1289,7 +1290,7 @@ xmlNanoHTTPBypassProxy(const char *hostname) {
|
||||
env = cpy;
|
||||
|
||||
/* The remainder of the function is basically a tokenizing: */
|
||||
while (isspace(*env))
|
||||
while (isspace((unsigned char)*env))
|
||||
++env;
|
||||
if (*env == '\0') {
|
||||
xmlFree(cpy);
|
||||
@ -1310,7 +1311,7 @@ xmlNanoHTTPBypassProxy(const char *hostname) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
while (isspace(*env))
|
||||
while (isspace((unsigned char)*env))
|
||||
++env;
|
||||
p = env;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user