mirror of
https://github.com/curl/curl.git
synced 2026-08-01 08:48:08 +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
|
|
@ -2299,7 +2299,7 @@ static CURLcode ftp_state_size_resp(struct Curl_easy *data,
|
|||
else
|
||||
fdigit = start;
|
||||
/* ignores parsing errors, which will make the size remain unknown */
|
||||
(void)curlx_strtoofft(fdigit, NULL, 0, &filesize);
|
||||
(void)curlx_strtoofft(fdigit, NULL, 10, &filesize);
|
||||
|
||||
}
|
||||
else if(ftpcode == 550) { /* "No such file or directory" */
|
||||
|
|
@ -2484,7 +2484,7 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
|
|||
if(bytes) {
|
||||
++bytes;
|
||||
/* get the number! */
|
||||
(void)curlx_strtoofft(bytes, NULL, 0, &size);
|
||||
(void)curlx_strtoofft(bytes, NULL, 10, &size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue