From 7fb75582f41bb59624a9c190a429c28beb7b0927 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 20 Dec 2016 17:13:26 +0000 Subject: [PATCH] * tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger unspecified behaviour. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2638 --- ChangeLog | 6 ++++++ tools/tiff2pdf.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a20a527..bcca707f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-12-20 Even Rouault + + * tools/tiff2pdf.c: fix wrong usage of memcpy() that can trigger + unspecified behaviour. + Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2638 + 2016-12-18 Even Rouault * libtiff/tif_getimage.c: fix potential memory leaks in error code diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c index afea414b..78ffa77d 100644 --- a/tools/tiff2pdf.c +++ b/tools/tiff2pdf.c @@ -1,4 +1,4 @@ -/* $Id: tiff2pdf.c,v 1.98 2016-12-18 10:37:59 erouault Exp $ +/* $Id: tiff2pdf.c,v 1.99 2016-12-20 17:13:26 erouault Exp $ * * tiff2pdf - converts a TIFF image to a PDF document * @@ -3593,7 +3593,8 @@ void t2p_tile_collapse_left( edgescanwidth = (scanwidth * edgetilewidth + (tilewidth - 1))/ tilewidth; for(i=0;i