summaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorMax Dymond <cmeister2@gmail.com>2018-01-30 09:56:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2018-01-30 17:23:35 +0100
commit811d96e9e210f94486ce90073fc0613b189cc368 (patch)
tree64d95b02fa97feeca0dde3f8806fec9ddd9e1fc0 /lib/file.c
parent3f8a727611b9fb048c407ee865e6e3a3f3150c9c (diff)
downloadcurl-811d96e9e210f94486ce90073fc0613b189cc368.tar.gz
file: Check the return code from Curl_range and bail out on error
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/file.c b/lib/file.c
index ac611e6a1..528f34afb 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -456,7 +456,9 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
}
/* 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
* of the stream iff the filesize could be determined */