summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-multimedia/libtiff/tiff/CVE-2022-34526.patch
blob: 48ca56982f44155b03cfb54c0787b09d606f68d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 3fc1fdda0068981340cc7ae136173731275e2c5e Mon Sep 17 00:00:00 2001
From: Hitendra Prajapati <hprajapati@mvista.com>
Date: Thu, 18 Aug 2022 10:46:30 +0530
Subject: [PATCH] CVE-2022-34526

Upstream-Status: Backport [https://gitlab.com/libtiff/libtiff/-/commit/275735d0354e39c0ac1dc3c0db2120d6f31d1990]
CVE: CVE-2022-34526
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
---
 libtiff/tif_dirinfo.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
index 8565dfb..0f722a5 100644
--- a/libtiff/tif_dirinfo.c
+++ b/libtiff/tif_dirinfo.c
@@ -1157,6 +1157,9 @@ _TIFFCheckFieldIsValidForCodec(TIFF *tif, ttag_t tag)
 	    default:
 		return 1;
 	}
+	if( !TIFFIsCODECConfigured(tif->tif_dir.td_compression) ) {
+		return 0;
+	}
 	/* Check if codec specific tags are allowed for the current
 	 * compression scheme (codec) */
 	switch (tif->tif_dir.td_compression) {
-- 
2.25.1