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

https://github.com/libsdl-org/libtiff/commit/a68524644ac4e127fe90e8adec70e057d698050a

From a68524644ac4e127fe90e8adec70e057d698050a Mon Sep 17 00:00:00 2001
From: Andrey Kiselev <[EMAIL REDACTED]>
Date: Tue, 6 Jul 2010 14:14:41 +0000
Subject: [PATCH] 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.

---
 ChangeLog             | 7 ++++++-
 libtiff/tif_dirinfo.c | 6 +-----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 762d2c58..06fe566a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2010-07-02  Andrey Kiselev  <dron@ak4719.spb.edu>
+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.
 
 	* libtiff/{tif_dirwrite.c, tif_print.c}: Properly handle "DotRange"
 	tag as it can be either byte or short size and should be set and read
diff --git a/libtiff/tif_dirinfo.c b/libtiff/tif_dirinfo.c
index 0a77c971..76ef572c 100644
--- a/libtiff/tif_dirinfo.c
+++ b/libtiff/tif_dirinfo.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirinfo.c,v 1.65.2.9 2010-06-09 21:15:27 bfriesen Exp $ */
+/* $Id: tif_dirinfo.c,v 1.65.2.10 2010-07-06 14:14:41 dron Exp $ */
 
 /*
  * Copyright (c) 1988-1997 Sam Leffler
@@ -808,8 +808,6 @@ _TIFFFieldWithTag(TIFF* tif, ttag_t tag)
 		TIFFErrorExt(tif->tif_clientdata, "TIFFFieldWithTag",
 			     "Internal error, unknown tag 0x%x",
 			     (unsigned int) tag);
-		assert(fip != NULL);
-		/*NOTREACHED*/
 	}
 	return (fip);
 }
@@ -822,8 +820,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);
 }