mirror of
https://github.com/curl/curl.git
synced 2026-06-21 01:15:37 +03:00
lib: parse numbers with fixed known base 10
... instead of using 0 argument that allows decimal, hex or octal when the number is documented and assumed to use base 10. Closes #9933
This commit is contained in:
parent
0fef73ea4a
commit
e9c580de4e
7 changed files with 11 additions and 10 deletions
|
|
@ -1663,13 +1663,13 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
CURLofft to_t;
|
||||
CURLofft from_t;
|
||||
|
||||
from_t = curlx_strtoofft(data->state.range, &ptr, 0, &from);
|
||||
from_t = curlx_strtoofft(data->state.range, &ptr, 10, &from);
|
||||
if(from_t == CURL_OFFT_FLOW) {
|
||||
return CURLE_RANGE_ERROR;
|
||||
}
|
||||
while(*ptr && (ISBLANK(*ptr) || (*ptr == '-')))
|
||||
ptr++;
|
||||
to_t = curlx_strtoofft(ptr, &ptr2, 0, &to);
|
||||
to_t = curlx_strtoofft(ptr, &ptr2, 10, &to);
|
||||
if(to_t == CURL_OFFT_FLOW) {
|
||||
return CURLE_RANGE_ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2503,12 +2503,12 @@ static CURLcode ssh_statemach_act(struct Curl_easy *data, bool *block)
|
|||
CURLofft to_t;
|
||||
CURLofft from_t;
|
||||
|
||||
from_t = curlx_strtoofft(data->state.range, &ptr, 0, &from);
|
||||
from_t = curlx_strtoofft(data->state.range, &ptr, 10, &from);
|
||||
if(from_t == CURL_OFFT_FLOW)
|
||||
return CURLE_RANGE_ERROR;
|
||||
while(*ptr && (ISBLANK(*ptr) || (*ptr == '-')))
|
||||
ptr++;
|
||||
to_t = curlx_strtoofft(ptr, &ptr2, 0, &to);
|
||||
to_t = curlx_strtoofft(ptr, &ptr2, 10, &to);
|
||||
if(to_t == CURL_OFFT_FLOW)
|
||||
return CURLE_RANGE_ERROR;
|
||||
if((to_t == CURL_OFFT_INVAL) /* no "to" value given */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue