summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorerouault <erouault>2017-01-11 12:51:59 +0000
committererouault <erouault>2017-01-11 12:51:59 +0000
commit04d8710a1050da773aeba686912baede89623ff3 (patch)
treea9dd915355982852e6d75213ad739a48ca642ae2 /tools
parente6227f90076a691a136756f047ea38d57f17dd97 (diff)
downloadlibtiff-04d8710a1050da773aeba686912baede89623ff3.tar.gz
* libtiff/tif_dirwrite.c: in TIFFWriteDirectoryTagCheckedRational, replace
assertion by runtime check to error out if passed value is strictly negative. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2535 * tools/tiffcrop.c: remove extraneous TIFFClose() in error code path, that caused double free. Related to http://bugzilla.maptools.org/show_bug.cgi?id=2535
Diffstat (limited to 'tools')
-rw-r--r--tools/tiffcrop.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
index 21dd0872..c69177e0 100644
--- a/tools/tiffcrop.c
+++ b/tools/tiffcrop.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcrop.c,v 1.49 2016-12-03 13:00:04 erouault Exp $ */
+/* $Id: tiffcrop.c,v 1.50 2017-01-11 12:51:59 erouault Exp $ */
/* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of
* the image data through additional options listed below
@@ -7996,7 +7996,6 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image,
if (!TIFFWriteDirectory(out))
{
TIFFError("","Failed to write IFD for page number %d", pagenum);
- TIFFClose(out);
return (-1);
}