Somebody makes a bug in tif_dirread.c when TIFFCreateAnonFieldInfo was introduced.

Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=119 in case
of _cvs_00000-00.tif, _cvs_00000-01.tif and _cvs_00000-02.tif.
This commit is contained in:
Andrey Kiselev 2002-04-08 17:07:19 +00:00
parent 336485980d
commit 0623f17aa1
2 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v 1.15 2002-04-03 20:14:20 warmerda Exp $ */ /* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirinfo.c,v 1.16 2002-04-08 17:07:19 dron Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
@ -463,7 +463,7 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type)
fld->field_oktochange = TRUE; fld->field_oktochange = TRUE;
fld->field_passcount = TRUE; fld->field_passcount = TRUE;
fld->field_name = (char *) _TIFFmalloc(32); fld->field_name = (char *) _TIFFmalloc(32);
sprintf( fld->field_name, "Tag %d", (int) tag ); snprintf(fld->field_name, 32, "Tag %d", (int) tag);
return fld; return fld;
} }

View File

@ -1,4 +1,4 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v 1.9 2002-03-27 14:46:45 warmerda Exp $ */ /* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v 1.10 2002-04-08 17:07:19 dron Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
@ -252,6 +252,7 @@ TIFFReadDirectory(TIFF* tif)
while (fix < tif->tif_nfields && while (fix < tif->tif_nfields &&
tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag) tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
fix++; fix++;
dp->tdir_tag = IGNORE;
} }
/* /*
* Null out old tags that we ignore. * Null out old tags that we ignore.