mirror of
https://github.com/curl/curl.git
synced 2026-08-25 18:43:41 +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
|
|
@ -422,7 +422,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||
char *endptr = finfo->b_data + 6;
|
||||
/* here we can deal with directory size, pass the leading
|
||||
whitespace and then the digits */
|
||||
while(ISSPACE(*endptr))
|
||||
while(ISBLANK(*endptr))
|
||||
endptr++;
|
||||
while(ISDIGIT(*endptr))
|
||||
endptr++;
|
||||
|
|
@ -894,7 +894,7 @@ size_t Curl_ftp_parselist(char *buffer, size_t size, size_t nmemb,
|
|||
parser->item_length++;
|
||||
switch(parser->state.NT.sub.time) {
|
||||
case PL_WINNT_TIME_PRESPACE:
|
||||
if(!ISSPACE(c)) {
|
||||
if(!ISBLANK(c)) {
|
||||
parser->state.NT.sub.time = PL_WINNT_TIME_TIME;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue