diff options
author | Lee Howard <faxguy@howardsilvan.com> | 2010-12-15 00:50:29 +0000 |
---|---|---|
committer | Lee Howard <faxguy@howardsilvan.com> | 2010-12-15 00:50:29 +0000 |
commit | 82b186f40835639b813148a6005e1be420fa260d (patch) | |
tree | 7717b5311c4e43b19530d6f8cee17ff45bade057 | |
parent | d00c0228b5715b0549cd4be6bcd688f834cca809 (diff) | |
download | libtiff-git-82b186f40835639b813148a6005e1be420fa260d.tar.gz |
* libtiff/tif_strip.c: use TIFFGetFieldDefaulted instead
of TIFFGetField when we assume that it will succeed
http://bugzilla.maptools.org/show_bug.cgi?id=2215
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libtiff/tif_strip.c | 20 |
2 files changed, 16 insertions, 10 deletions
@@ -1,5 +1,11 @@ 2010-12-14 Lee Howard <faxguy@howardsilvan.com> + * libtiff/tif_strip.c: use TIFFGetFieldDefaulted instead + of TIFFGetField when we assume that it will succeed + http://bugzilla.maptools.org/show_bug.cgi?id=2215 + +2010-12-14 Lee Howard <faxguy@howardsilvan.com> + * tools/gif2tiff.c: fix buffer overrun http://bugzilla.maptools.org/show_bug.cgi?id=2270 diff --git a/libtiff/tif_strip.c b/libtiff/tif_strip.c index b1d3ed92..0542d004 100644 --- a/libtiff/tif_strip.c +++ b/libtiff/tif_strip.c @@ -1,4 +1,4 @@ -/* $Id: tif_strip.c,v 1.19.2.2 2010-12-08 00:47:52 faxguy Exp $ */ +/* $Id: tif_strip.c,v 1.19.2.3 2010-12-15 00:50:30 faxguy Exp $ */ /* * Copyright (c) 1991-1997 Sam Leffler @@ -124,9 +124,9 @@ TIFFVStripSize(TIFF* tif, uint32 nrows) uint16 ycbcrsubsampling[2]; tsize_t w, scanline, samplingarea; - TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling + 0, - ycbcrsubsampling + 1 ); + TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, + ycbcrsubsampling + 0, + ycbcrsubsampling + 1); samplingarea = ycbcrsubsampling[0]*ycbcrsubsampling[1]; if (samplingarea == 0) { @@ -234,9 +234,9 @@ TIFFScanlineSize(TIFF* tif) && !isUpSampled(tif)) { uint16 ycbcrsubsampling[2]; - TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling + 0, - ycbcrsubsampling + 1); + TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, + ycbcrsubsampling + 0, + ycbcrsubsampling + 1); if (ycbcrsubsampling[0]*ycbcrsubsampling[1] == 0) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, @@ -304,9 +304,9 @@ TIFFNewScanlineSize(TIFF* tif) && !isUpSampled(tif)) { uint16 ycbcrsubsampling[2]; - TIFFGetField(tif, TIFFTAG_YCBCRSUBSAMPLING, - ycbcrsubsampling + 0, - ycbcrsubsampling + 1); + TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, + ycbcrsubsampling + 0, + ycbcrsubsampling + 1); if (ycbcrsubsampling[0]*ycbcrsubsampling[1] == 0) { TIFFErrorExt(tif->tif_clientdata, tif->tif_name, |