From 4958e19faedbda5da699a61009e6c774884d6f8a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 23 Aug 2017 13:21:41 +0000 Subject: [PATCH] * libtiff/tif_dirwrite.c: replace assertion related to not finding the SubIFD tag by runtime check. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 Reported by team OWL337 --- ChangeLog | 7 +++++++ libtiff/tif_dirwrite.c | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3da2b704..87554768 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-08-23 Even Rouault + + * libtiff/tif_dirwrite.c: replace assertion related to not finding the + SubIFD tag by runtime check. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2727 + Reported by team OWL337 + 2017-07-24 Even Rouault * libtiff/tif_luv.c: further reduce memory requirements for temporary diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c index 449cec32..9553f860 100644 --- a/libtiff/tif_dirwrite.c +++ b/libtiff/tif_dirwrite.c @@ -1,4 +1,4 @@ -/* $Id: tif_dirwrite.c,v 1.87 2017-06-30 17:31:45 erouault Exp $ */ +/* $Id: tif_dirwrite.c,v 1.88 2017-08-23 13:21:42 erouault Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -821,7 +821,12 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) TIFFDirEntry* nb; for (na=0, nb=dir; ; na++, nb++) { - assert(natif_clientdata,module, + "Cannot find SubIFD tag"); + goto bad; + } if (nb->tdir_tag==TIFFTAG_SUBIFD) break; }