Blame SOURCES/0009-CVE-2018-10963-TIFFWriteDirectorySec-avoid-assertion.patch
|
|
ccba1e |
From 142912f9f5bce169d9d0b16a687c00f9edec5825 Mon Sep 17 00:00:00 2001
|
|
|
b03815 |
From: Even Rouault <even.rouault@spatialys.com>
|
|
|
b03815 |
Date: Sat, 12 May 2018 14:24:15 +0200
|
|
|
ccba1e |
Subject: [PATCH] (CVE-2018-10963) TIFFWriteDirectorySec: avoid assertion.
|
|
|
ccba1e |
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
|
|
|
b03815 |
|
|
|
ccba1e |
(cherry picked from commit de144fd228e4be8aa484c3caf3d814b6fa88c6d9)
|
|
|
b03815 |
---
|
|
|
b03815 |
libtiff/tif_dirwrite.c | 7 +++++--
|
|
|
b03815 |
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
b03815 |
|
|
|
b03815 |
diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c
|
|
|
ccba1e |
index c68d6d21..5d0a6699 100644
|
|
|
b03815 |
--- a/libtiff/tif_dirwrite.c
|
|
|
b03815 |
+++ b/libtiff/tif_dirwrite.c
|
|
|
b03815 |
@@ -697,8 +697,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
|
|
|
b03815 |
}
|
|
|
b03815 |
break;
|
|
|
b03815 |
default:
|
|
|
b03815 |
- assert(0); /* we should never get here */
|
|
|
b03815 |
- break;
|
|
|
b03815 |
+ TIFFErrorExt(tif->tif_clientdata,module,
|
|
|
b03815 |
+ "Cannot write tag %d (%s)",
|
|
|
b03815 |
+ TIFFFieldTag(o),
|
|
|
b03815 |
+ o->field_name ? o->field_name : "unknown");
|
|
|
b03815 |
+ goto bad;
|
|
|
b03815 |
}
|
|
|
b03815 |
}
|
|
|
b03815 |
}
|