mirror of
https://github.com/curl/curl.git
synced 2026-08-26 18:13: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
|
|
@ -221,6 +221,7 @@ CURLofft curlx_strtoofft(const char *str, char **endp, int base,
|
|||
curl_off_t number;
|
||||
errno = 0;
|
||||
*num = 0; /* clear by default */
|
||||
DEBUGASSERT(base); /* starting now, avoid base zero */
|
||||
|
||||
while(*str && ISBLANK(*str))
|
||||
str++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue