aboutsummaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-11-29 23:04:30 +0000
committerOmar Polo <op@omarpolo.com>2022-11-29 23:04:30 +0000
commit52772181b5adf4709a8219ef283210564a184352 (patch)
treedae852f894c3c1e61d513731d4d0ba76d12dc7ae /server.c
parent4107583e32017d94beda9de6f531ca82bb1e7ffe (diff)
always cast is*() arguments to unsigned char
backport of 6130e0e and 06035a0
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/server.c b/server.c
index 2258e67..d29658c 100644
--- a/server.c
+++ b/server.c
@@ -1334,9 +1334,9 @@ cgi_read(struct bufferevent *bev, void *d)
}
if (len < 3 || len > 1029 ||
- !isdigit(header[0]) ||
- !isdigit(header[1]) ||
- !isspace(header[2])) {
+ !isdigit((unsigned char)header[0]) ||
+ !isdigit((unsigned char)header[1]) ||
+ !isspace((unsigned char)header[2])) {
free(header);
log_warn(client, "CGI script is trying to send a "
"malformed header");