mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
strtoofft: Remove extraneous null check
Fixes #1950: curlx_strtoofft() doesn't fully protect against null 'str' argument. Closes #1952
This commit is contained in:
parent
2dcc378381
commit
454dae0092
@ -219,7 +219,10 @@ CURLofft curlx_strtoofft(const char *str, char **endp, int base,
|
||||
curl_off_t number;
|
||||
errno = 0;
|
||||
*num = 0; /* clear by default */
|
||||
while(str && *str && ISSPACE(*str))
|
||||
|
||||
DEBUGASSERT(str);
|
||||
|
||||
while(*str && ISSPACE(*str))
|
||||
str++;
|
||||
if('-' == *str) {
|
||||
if(endp)
|
||||
|
Loading…
Reference in New Issue
Block a user