Skip to content

Commit

Permalink
file: output the correct buffer to the user
Browse files Browse the repository at this point in the history
Regression brought by 7c312f8 (April 2017)

CVE-2017-1000099

Bug: https://curl.haxx.se/docs/adv_20170809C.html

Credit to OSS-Fuzz for the discovery
  • Loading branch information
rouault authored and bagder committed Aug 7, 2017
1 parent fa48987 commit c9332fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/file.c
Expand Up @@ -501,7 +501,7 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
tm->tm_hour,
tm->tm_min,
tm->tm_sec);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0);
if(!result)
/* set the file size to make it available post transfer */
Curl_pgrsSetDownloadSize(data, expected_size);
Expand Down

0 comments on commit c9332fa

Please sign in to comment.