summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch')
-rw-r--r--meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch b/meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch
new file mode 100644
index 0000000000..406d467766
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2020-35524-2.patch
@@ -0,0 +1,36 @@
1From d74f56e3b7ea55c8a18a03bc247cd5fd0ca288b2 Mon Sep 17 00:00:00 2001
2From: Thomas Bernard <miniupnp@free.fr>
3Date: Tue, 10 Nov 2020 02:05:05 +0100
4Subject: [PATCH] Fix for building without JPEG support
5
6Upstream-Status: Backport
7https://gitlab.com/libtiff/libtiff/-/commit/d74f56e3b7ea55c8a18a03bc247cd5fd0ca288b2
8https://gitlab.com/libtiff/libtiff/-/merge_requests/159/commits
9CVE: CVE-2021-35524
10Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com>
11---
12 tools/tiff2pdf.c | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
16index dc69d2f9..d0b0ede7 100644
17--- a/tools/tiff2pdf.c
18+++ b/tools/tiff2pdf.c
19@@ -2087,10 +2087,13 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
20 #endif
21 (void) 0;
22 }
23+#ifdef JPEG_SUPPORT
24 if(t2p->pdf_compression == T2P_COMPRESS_JPEG
25 && t2p->tiff_photometric == PHOTOMETRIC_YCBCR) {
26 k = checkMultiply64(TIFFNumberOfStrips(input), TIFFStripSize(input), t2p);
27- } else {
28+ } else
29+#endif
30+ {
31 k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);
32 if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
33 k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
34--
35GitLab
36