diff options
author | Even Rouault <even.rouault@spatialys.com> | 2016-12-03 11:35:56 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2016-12-03 11:35:56 +0000 |
commit | 3a1c5ac67b8268a3c29f8cf74ca8bd7af8c037f7 (patch) | |
tree | 28d78ae8af6f41af03e9f744c858b414643e852c /tools/tiffcrop.c | |
parent | 45ba019d0f0940de2ac59b85c153c5ec7157ea5f (diff) | |
download | libtiff-git-3a1c5ac67b8268a3c29f8cf74ca8bd7af8c037f7.tar.gz |
* tools/tiffcrop.c: fix readContigStripsIntoBuffer() in -i (ignore) mode so
that the output buffer is correctly incremented to avoid write outside bounds.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2620
Diffstat (limited to 'tools/tiffcrop.c')
-rw-r--r-- | tools/tiffcrop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 722b132c..bdcbd63e 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.46 2016-11-18 14:58:46 erouault Exp $ */ +/* $Id: tiffcrop.c,v 1.47 2016-12-03 11:35:56 erouault Exp $ */ /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below @@ -3698,7 +3698,7 @@ static int readContigStripsIntoBuffer (TIFF* in, uint8* buf) (unsigned long) strip, (unsigned long)rows); return 0; } - bufp += bytes_read; + bufp += stripsize; } return 1; |