* tools/tiffsplit.c (tiffcp): TIFFGetField count field should be

uint32 type for TIFFTAG_JPEGTABLES.  Patch by Christophe
Deroulers.
This commit is contained in:
Bob Friesenhahn 2011-10-22 17:03:00 +00:00
parent b741f89f25
commit cae87ed58a
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-10-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* tools/tiffsplit.c (tiffcp): TIFFGetField count field should be
uint32 type for TIFFTAG_JPEGTABLES. Patch by Christophe
Deroulers.
2011-06-21 Frank Warmerdam <warmerdam@pobox.com> 2011-06-21 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/libtiff.def: Restore TIFFMergeFieldInfo. * libtiff/libtiff.def: Restore TIFFMergeFieldInfo.

View File

@ -1,4 +1,4 @@
/* $Id: tiffsplit.c,v 1.21 2010-12-11 19:16:48 faxguy Exp $ */ /* $Id: tiffsplit.c,v 1.22 2011-10-22 17:03:01 bfriesen Exp $ */
/* /*
* Copyright (c) 1992-1997 Sam Leffler * Copyright (c) 1992-1997 Sam Leffler
@ -172,7 +172,7 @@ tiffcp(TIFF* in, TIFF* out)
CopyField(TIFFTAG_SAMPLESPERPIXEL, samplesperpixel); CopyField(TIFFTAG_SAMPLESPERPIXEL, samplesperpixel);
CopyField(TIFFTAG_COMPRESSION, compression); CopyField(TIFFTAG_COMPRESSION, compression);
if (compression == COMPRESSION_JPEG) { if (compression == COMPRESSION_JPEG) {
uint16 count = 0; uint32 count = 0;
void *table = NULL; void *table = NULL;
if (TIFFGetField(in, TIFFTAG_JPEGTABLES, &count, &table) if (TIFFGetField(in, TIFFTAG_JPEGTABLES, &count, &table)
&& count > 0 && table) { && count > 0 && table) {