file: Check the return code from Curl_range and bail out on error

This commit is contained in:
Max Dymond 2018-01-30 09:56:28 +00:00 committed by Daniel Stenberg
parent 3f8a727611
commit 811d96e9e2
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -456,7 +456,9 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
} }
/* Check whether file range has been specified */ /* Check whether file range has been specified */
Curl_range(conn); result = Curl_range(conn);
if(result)
return result;
/* Adjust the start offset in case we want to get the N last bytes /* Adjust the start offset in case we want to get the N last bytes
* of the stream iff the filesize could be determined */ * of the stream iff the filesize could be determined */