diff options
Diffstat (limited to 'meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch')
-rw-r--r-- | meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch new file mode 100644 index 0000000000..d485a1bd6e --- /dev/null +++ b/meta/recipes-extended/unzip/unzip/CVE-2019-13232_p1.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 080d52c3c9416c731f637f9c6e003961ef43f079 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mark Adler <madler@alumni.caltech.edu> | ||
3 | Date: Mon, 27 May 2019 08:20:32 -0700 | ||
4 | Subject: [PATCH 1/3] Fix bug in undefer_input() that misplaced the input | ||
5 | state. | ||
6 | |||
7 | CVE: CVE-2019-13232 | ||
8 | Upstream-Status: Backport | ||
9 | [https://github.com/madler/unzip/commit/41beb477c5744bc396fa1162ee0c14218ec12213] | ||
10 | |||
11 | Signed-off-by: Dan Tran <dantran@microsoft.com> | ||
12 | --- | ||
13 | fileio.c | 4 +++- | ||
14 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/fileio.c b/fileio.c | ||
17 | index 7605a29..14460f3 100644 | ||
18 | --- a/fileio.c | ||
19 | +++ b/fileio.c | ||
20 | @@ -532,8 +532,10 @@ void undefer_input(__G) | ||
21 | * This condition was checked when G.incnt_leftover was set > 0 in | ||
22 | * defer_leftover_input(), and it is NOT allowed to touch G.csize | ||
23 | * before calling undefer_input() when (G.incnt_leftover > 0) | ||
24 | - * (single exception: see read_byte()'s "G.csize <= 0" handling) !! | ||
25 | + * (single exception: see readbyte()'s "G.csize <= 0" handling) !! | ||
26 | */ | ||
27 | + if (G.csize < 0L) | ||
28 | + G.csize = 0L; | ||
29 | G.incnt = G.incnt_leftover + (int)G.csize; | ||
30 | G.inptr = G.inptr_leftover - (int)G.csize; | ||
31 | G.incnt_leftover = 0; | ||
32 | -- | ||
33 | 2.22.0.vfs.1.1.57.gbaf16c8 | ||