summaryrefslogtreecommitdiff
path: root/tools/tiffcrop.c
diff options
context:
space:
mode:
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>2015-05-28 02:19:16 +0000
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>2015-05-28 02:19:16 +0000
commitc05bbbe6e8951651ea2d00573b687f1e7f9af834 (patch)
tree8b7754cdae7fc663bcddc358ae8cd6673254c7c0 /tools/tiffcrop.c
parent022cd04c804894e4f9154b794b91df720b0ab6a0 (diff)
downloadlibtiff-git-c05bbbe6e8951651ea2d00573b687f1e7f9af834.tar.gz
(loadImage): Fix Coverity 1299740 "Out-of-bounds write".
Diffstat (limited to 'tools/tiffcrop.c')
-rw-r--r--tools/tiffcrop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
index a28f49d0..78b93a92 100644
--- a/tools/tiffcrop.c
+++ b/tools/tiffcrop.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcrop.c,v 1.31 2015-05-28 02:16:08 bfriesen Exp $ */
+/* $Id: tiffcrop.c,v 1.32 2015-05-28 02:19:16 bfriesen Exp $ */
/* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of
* the image data through additional options listed below
@@ -6013,7 +6013,7 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c
{
if (prev_readsize < buffsize)
{
- new_buff = _TIFFrealloc(read_buff, buffsize);
+ new_buff = _TIFFrealloc(read_buff, buffsize+3);
if (!new_buff)
{
free (read_buff);