diff options
author | Daniel Stenberg <daniel@haxx.se> | 2022-09-05 23:21:15 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2022-09-06 08:34:30 +0200 |
commit | 6f9fb7ec2d7cb389a0da5a1d0617ce592115a6a8 (patch) | |
tree | 44b640deb9b58ca0f50a60395ee7259c19344506 /lib/hsts.c | |
parent | 8dd95da35be27c28da9e0d082f3ce02d2200b82a (diff) | |
download | curl-6f9fb7ec2d7cb389a0da5a1d0617ce592115a6a8.tar.gz |
misc: ISSPACE() => ISBLANK()
Instances of ISSPACE() use that should rather use ISBLANK(). I think
somewhat carelessly used because it sounds as if it checks for space or
whitespace, but also includes %0a to %0d.
For parsing purposes, we should only accept what we must and not be
overly liberal. It leads to surprises and surprises lead to bad things.
Closes #9432
Diffstat (limited to 'lib/hsts.c')
-rw-r--r-- | lib/hsts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hsts.c b/lib/hsts.c index 4ba0f3072..e3b686ebf 100644 --- a/lib/hsts.c +++ b/lib/hsts.c @@ -156,7 +156,7 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname, return CURLE_OK; do { - while(*p && ISSPACE(*p)) + while(*p && ISBLANK(*p)) p++; if(Curl_strncasecompare("max-age=", p, 8)) { bool quoted = FALSE; @@ -167,7 +167,7 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname, return CURLE_BAD_FUNCTION_ARGUMENT; p += 8; - while(*p && ISSPACE(*p)) + while(*p && ISBLANK(*p)) p++; if(*p == '\"') { p++; @@ -200,7 +200,7 @@ CURLcode Curl_hsts_parse(struct hsts *h, const char *hostname, p++; } - while(*p && ISSPACE(*p)) + while(*p && ISBLANK(*p)) p++; if(*p == ';') p++; |