strtoofft: Remove extraneous null check

Fixes #1950: curlx_strtoofft() doesn't fully protect against null 'str'
argument.

Closes #1952
This commit is contained in:
Benbuck Nason 2017-10-05 12:45:51 -07:00 committed by Daniel Stenberg
parent 2dcc378381
commit 454dae0092
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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)