kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit aaf8be40c20dafbbb1b4e1693567f062beea9267
parent 4498270bbe31c1601526b4b9b6ba88dfd60306ad
Author: Joris Vink <joris@coders.se>
Date:   Tue,  8 Sep 2020 19:19:56 +0200

Add casts for isxdigit and isspace.

The argument must be representable as an unsigned char or EOF.

Diffstat:
src/cli.c | 2+-
src/http.c | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/cli.c b/src/cli.c @@ -1120,7 +1120,7 @@ cli_build_asset(char *fpath, struct dirent *dp) /* Replace dots, spaces, etc etc with underscores. */ for (p = name; *p != '\0'; p++) { - if (*p == '.' || isspace(*p) || *p == '-') + if (*p == '.' || isspace((unsigned char)*p) || *p == '-') *p = '_'; } diff --git a/src/http.c b/src/http.c @@ -1002,7 +1002,8 @@ http_argument_urldecode(char *arg) return (KORE_RESULT_ERROR); } - if (!isxdigit(*(p + 1)) || !isxdigit(*(p + 2))) { + if (!isxdigit((unsigned char)*(p + 1)) || + !isxdigit((unsigned char)*(p + 2))) { *in++ = *p++; continue; }