From 0623f17aa1c95471e375a06f0983c3d4af4530ad Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Mon, 8 Apr 2002 17:07:19 +0000 Subject: [PATCH] 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. --- libtiff/tif_dirinfo.c | 4 ++-- libtiff/tif_dirread.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c index 58901762..a2715734 100644 --- a/libtiff/tif_dirinfo.c +++ b/libtiff/tif_dirinfo.c @@ -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 @@ -463,7 +463,7 @@ _TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type) fld->field_oktochange = TRUE; fld->field_passcount = TRUE; 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; } diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c index 73848c35..477e822e 100644 --- a/libtiff/tif_dirread.c +++ b/libtiff/tif_dirread.c @@ -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 @@ -252,6 +252,7 @@ TIFFReadDirectory(TIFF* tif) while (fix < tif->tif_nfields && tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag) fix++; + dp->tdir_tag = IGNORE; } /* * Null out old tags that we ignore.