mirror of
https://github.com/curl/curl.git
synced 2026-08-24 23:13:38 +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
|
|
@ -1667,7 +1667,7 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
if(from_t == CURL_OFFT_FLOW) {
|
||||
return CURLE_RANGE_ERROR;
|
||||
}
|
||||
while(*ptr && (ISSPACE(*ptr) || (*ptr == '-')))
|
||||
while(*ptr && (ISBLANK(*ptr) || (*ptr == '-')))
|
||||
ptr++;
|
||||
to_t = curlx_strtoofft(ptr, &ptr2, 0, &to);
|
||||
if(to_t == CURL_OFFT_FLOW) {
|
||||
|
|
|
|||
|
|
@ -2506,7 +2506,7 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
from_t = curlx_strtoofft(data->state.range, &ptr, 0, &from);
|
||||
if(from_t == CURL_OFFT_FLOW)
|
||||
return CURLE_RANGE_ERROR;
|
||||
while(*ptr && (ISSPACE(*ptr) || (*ptr == '-')))
|
||||
while(*ptr && (ISBLANK(*ptr) || (*ptr == '-')))
|
||||
ptr++;
|
||||
to_t = curlx_strtoofft(ptr, &ptr2, 0, &to);
|
||||
if(to_t == CURL_OFFT_FLOW)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue