]> granicus.if.org Git - curl/commitdiff
file: Check the return code from Curl_range and bail out on error
authorMax Dymond <cmeister2@gmail.com>
Tue, 30 Jan 2018 09:56:28 +0000 (09:56 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 30 Jan 2018 16:23:35 +0000 (17:23 +0100)
lib/file.c

index ac611e6a1e300e1983e4705e1fd054e9f71a8c73..528f34afba5154c69880eec013e1ef06a24a525a 100644 (file)
@@ -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 */