Don't use assertions in _TIFFFieldWithTag() and _TIFFFieldWithName() if the

tag is not found in the tag table. This should be normal situation and
returned NULL value should be properly handled by the caller.
This commit is contained in:
Andrey Kiselev 2010-07-06 14:16:05 +00:00
parent 2a34d038af
commit 1cf8becfc2
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2010-07-06 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/tif_dirinfo.c: Don't use assertions in _TIFFFieldWithTag()
and _TIFFFieldWithName() if the tag is not found in the tag table.
This should be normal situation and returned NULL value should be
properly handled by the caller.
2010-07-02 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/tif_getimage.c: Avoid wrong math du to the signed/unsigned

View File

@ -1,4 +1,4 @@
/* $Id: tif_dirinfo.c,v 1.110 2010-06-13 19:37:23 fwarmerdam Exp $ */
/* $Id: tif_dirinfo.c,v 1.111 2010-07-06 14:16:05 dron Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@ -538,8 +538,6 @@ TIFFFieldWithTag(TIFF* tif, uint32 tag)
TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithTag",
"Internal error, unknown tag 0x%x",
(unsigned int) tag);
assert(fip != NULL);
/*NOTREACHED*/
}
return (fip);
}
@ -552,8 +550,6 @@ TIFFFieldWithName(TIFF* tif, const char *field_name)
if (!fip) {
TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithName",
"Internal error, unknown tag %s", field_name);
assert(fip != NULL);
/*NOTREACHED*/
}
return (fip);
}