diff options
author | erouault <erouault> | 2016-11-18 14:58:46 +0000 |
---|---|---|
committer | erouault <erouault> | 2016-11-18 14:58:46 +0000 |
commit | 1b972233b555a2c2805153d4b4127d715b76ec44 (patch) | |
tree | 00f33ee5251b77799aba7d223d5fd474f206b909 | |
parent | 243c9a5588206f1809eca701374a392077e68c15 (diff) | |
download | libtiff-1b972233b555a2c2805153d4b4127d715b76ec44.tar.gz |
* tools/tiffcrop.c: Fix memory leak in (recent) error code path.
Fixes Coverity 1394415.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | tools/tiffcrop.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2016-11-18 Even Rouault <even.rouault at spatialys.com> + + * tools/tiffcrop.c: Fix memory leak in (recent) error code path. + Fixes Coverity 1394415. + 2016-11-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us> * libtiff/tif_getimage.c: Fix some benign warnings which appear in diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index eb3d2d49..722b132c 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.45 2016-11-12 19:57:16 bfriesen Exp $ */ +/* $Id: tiffcrop.c,v 1.46 2016-11-18 14:58:46 erouault Exp $ */ /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below @@ -1349,6 +1349,7 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8* buf, uint32 imagelength { TIFFError(TIFFFileName(out), "Error, uint32 overflow when computing (imagewidth * bps * spp) + 7"); + _TIFFfree(obuf); return 1; } src_rowsize = ((imagewidth * spp * bps) + 7U) / 8; |