commit dc438c84e129c666039277f3cd8eb9788dec93e5
parent 85d6ee233ea16724799840840cb19c955cc0842f
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Mon, 9 Aug 2021 18:56:59 +0200
parse_content_length: be strict and prevent UB
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hurl.c b/hurl.c
@@ -76,7 +76,7 @@ parse_content_length(const char *s, size_t *length)
p += sizeof("\r\nContent-Length:") - 1;
p += strspn(p, " \t");
- if (!isdigit(*p))
+ if (!isdigit((unsigned char)*p))
return -1;
errno = 0;