set tif_foundfield to NULL if tif_fieldinfo realloced, bug 630

This commit is contained in:
Frank Warmerdam 2004-10-08 14:06:16 +00:00
parent 54d78d3e2b
commit 624b33949d
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-10-08 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation
of tif_fieldinfo.
http://bugzilla.remotesensing.org/show_bug.cgi?id=630
2004-10-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us> 2004-10-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* contrib/iptcutil/README: Added the missing README which goes * contrib/iptcutil/README: Added the missing README which goes

View File

@ -1,4 +1,4 @@
/* $Id: tif_dirinfo.c,v 1.32 2004-10-02 13:29:41 dron Exp $ */ /* $Id: tif_dirinfo.c,v 1.33 2004-10-08 14:06:16 fwarmerdam Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
@ -304,6 +304,8 @@ _TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], int n)
TIFFFieldInfo** tp; TIFFFieldInfo** tp;
int i; int i;
tif->tif_foundfield = NULL;
if (tif->tif_nfields > 0) { if (tif->tif_nfields > 0) {
tif->tif_fieldinfo = (TIFFFieldInfo**) tif->tif_fieldinfo = (TIFFFieldInfo**)
_TIFFrealloc(tif->tif_fieldinfo, _TIFFrealloc(tif->tif_fieldinfo,