summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-10963.patch
blob: 7252298b520818a2a89b887df103534861efcbd2 (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
30
31
32
33
34
35
36
37
38
39
From de144fd228e4be8aa484c3caf3d814b6fa88c6d9 Mon Sep 17 00:00:00 2001
From: Even Rouault <even.rouault@spatialys.com>
Date: Sat, 12 May 2018 14:24:15 +0200
Subject: [PATCH] TIFFWriteDirectorySec: avoid assertion. Fixes
 http://bugzilla.maptools.org/show_bug.cgi?id=2795.
 CVE-2018-10963

---
CVE: CVE-2018-10963

Upstream-Status: Backport [gitlab.com/libtiff/libtiff/commit/de144f...]

Signed-off-by: Joe Slater <joe.slater@windriver.com>

---
 libtiff/tif_dirwrite.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
index 2430de6..c15a28d 100644
--- a/libtiff/tif_dirwrite.c
+++ b/libtiff/tif_dirwrite.c
@@ -695,8 +695,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
 								}
 								break;
 							default:
-								assert(0);   /* we should never get here */
-								break;
+								TIFFErrorExt(tif->tif_clientdata,module,
+								            "Cannot write tag %d (%s)",
+								            TIFFFieldTag(o),
+                                                                            o->field_name ? o->field_name : "unknown");
+								goto bad;
 						}
 					}
 				}
-- 
1.7.9.5

OpenPOWER on IntegriCloud