mirror of https://git.kore.io/kore.git
Add casts for isxdigit and isspace.
The argument must be representable as an unsigned char or EOF.
This commit is contained in:
parent
4498270bbe
commit
aaf8be40c2
|
@ -1120,7 +1120,7 @@ cli_build_asset(char *fpath, struct dirent *dp)
|
||||||
|
|
||||||
/* Replace dots, spaces, etc etc with underscores. */
|
/* Replace dots, spaces, etc etc with underscores. */
|
||||||
for (p = name; *p != '\0'; p++) {
|
for (p = name; *p != '\0'; p++) {
|
||||||
if (*p == '.' || isspace(*p) || *p == '-')
|
if (*p == '.' || isspace((unsigned char)*p) || *p == '-')
|
||||||
*p = '_';
|
*p = '_';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1002,7 +1002,8 @@ http_argument_urldecode(char *arg)
|
||||||
return (KORE_RESULT_ERROR);
|
return (KORE_RESULT_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isxdigit(*(p + 1)) || !isxdigit(*(p + 2))) {
|
if (!isxdigit((unsigned char)*(p + 1)) ||
|
||||||
|
!isxdigit((unsigned char)*(p + 2))) {
|
||||||
*in++ = *p++;
|
*in++ = *p++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue