summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libtiff/files/CVE-2017-7594-p2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/libtiff/files/CVE-2017-7594-p2.patch')
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2017-7594-p2.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2017-7594-p2.patch b/meta/recipes-multimedia/libtiff/files/CVE-2017-7594-p2.patch
new file mode 100644
index 0000000000..82a19c6810
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2017-7594-p2.patch
@@ -0,0 +1,50 @@
1From 2ea32f7372b65c24b2816f11c04bf59b5090d05b Mon Sep 17 00:00:00 2001
2From: erouault <erouault>
3Date: Thu, 12 Jan 2017 19:23:20 +0000
4Subject: [PATCH 2/2] * libtiff/tif_ojpeg.c: fix leak in
5 OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable and
6 OJPEGReadHeaderInfoSecTablesAcTable
7
8Upstream-status: Backport
9
10CVE: CVE-2017-7594 #patch2
11Signed-off-by: Rajkumar Veer <rveer@mvista.com>
12Index: tiff-4.0.7/ChangeLog
13===================================================================
14--- tiff-4.0.7.orig/ChangeLog 2017-04-24 16:50:26.465897646 +0530
15+++ tiff-4.0.7/ChangeLog 2017-04-24 16:56:20.685888360 +0530
16@@ -1,6 +1,7 @@
17 2017-01-12 Even Rouault <even.rouault at spatialys.com>
18
19- * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesAcTable
20+ * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable,
21+ OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable
22 when read fails.
23 Patch by Nicolás Peña.
24 Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2659
25Index: tiff-4.0.7/libtiff/tif_ojpeg.c
26===================================================================
27--- tiff-4.0.7.orig/libtiff/tif_ojpeg.c 2017-04-24 16:52:27.349894477 +0530
28+++ tiff-4.0.7/libtiff/tif_ojpeg.c 2017-04-24 16:59:20.001883660 +0530
29@@ -1790,7 +1790,10 @@
30 TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET);
31 p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
32 if (p!=64)
33+ {
34+ _TIFFfree(ob);
35 return(0);
36+ }
37 sp->qtable[m]=ob;
38 sp->sof_tq[m]=m;
39 }
40@@ -1854,7 +1857,10 @@
41 rb[sizeof(uint32)+5+n]=o[n];
42 p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
43 if (p!=q)
44+ {
45+ _TIFFfree(rb);
46 return(0);
47+ }
48 sp->dctable[m]=rb;
49 sp->sos_tda[m]=(m<<4);
50 }