mirror of
https://github.com/curl/curl.git
synced 2026-08-04 14:56:19 +03:00
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
This commit is contained in:
parent
8dd95da35b
commit
6f9fb7ec2d
20 changed files with 32 additions and 32 deletions
|
|
@ -116,7 +116,7 @@ size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
|
|||
const char *etag_h = &str[5];
|
||||
const char *eot = end - 1;
|
||||
if(*eot == '\n') {
|
||||
while(ISSPACE(*etag_h) && (etag_h < eot))
|
||||
while(ISBLANK(*etag_h) && (etag_h < eot))
|
||||
etag_h++;
|
||||
while(ISSPACE(*eot))
|
||||
eot--;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static void voutf(struct GlobalConfig *config,
|
|||
if(len > width) {
|
||||
size_t cut = width-1;
|
||||
|
||||
while(!ISSPACE(ptr[cut]) && cut) {
|
||||
while(!ISBLANK(ptr[cut]) && cut) {
|
||||
cut--;
|
||||
}
|
||||
if(0 == cut)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue