summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/curl/curl/CVE-2017-1000099.patch')
-rw-r--r--meta/recipes-support/curl/curl/CVE-2017-1000099.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2017-1000099.patch b/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
new file mode 100644
index 0000000000..96ff1b064b
--- /dev/null
+++ b/meta/recipes-support/curl/curl/CVE-2017-1000099.patch
@@ -0,0 +1,41 @@
1From c9332fa5e84f24da300b42b1a931ade929d3e27d Mon Sep 17 00:00:00 2001
2From: Even Rouault <even.rouault@spatialys.com>
3Date: Tue, 1 Aug 2017 17:17:06 +0200
4Subject: [PATCH] file: output the correct buffer to the user
5
6Regression brought by 7c312f84ea930d8 (April 2017)
7
8CVE: CVE-2017-1000099
9
10Bug: https://curl.haxx.se/docs/adv_20170809C.html
11
12Credit to OSS-Fuzz for the discovery
13
14Upstream-Status: Backport
15https://github.com/curl/curl/commit/c9332fa5e84f24da300b42b1a931ade929d3e27d
16
17Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
18---
19 lib/file.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/lib/file.c b/lib/file.c
23index bd426eac2..666cbe75b 100644
24--- a/lib/file.c
25+++ b/lib/file.c
26@@ -499,11 +499,11 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
27 Curl_month[tm->tm_mon],
28 tm->tm_year + 1900,
29 tm->tm_hour,
30 tm->tm_min,
31 tm->tm_sec);
32- result = Curl_client_write(conn, CLIENTWRITE_BOTH, buf, 0);
33+ result = Curl_client_write(conn, CLIENTWRITE_BOTH, header, 0);
34 if(!result)
35 /* set the file size to make it available post transfer */
36 Curl_pgrsSetDownloadSize(data, expected_size);
37 return result;
38 }
39--
402.13.3
41