summaryrefslogtreecommitdiff
path: root/libtiff/tif_print.c
diff options
context:
space:
mode:
Diffstat (limited to 'libtiff/tif_print.c')
-rw-r--r--libtiff/tif_print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c
index db35e1c6..a071b124 100644
--- a/libtiff/tif_print.c
+++ b/libtiff/tif_print.c
@@ -81,7 +81,7 @@ _TIFFPrintField(FILE* fd, const TIFFField *fip,
/* Print a user-friendly name for tags of relatively common use, but */
/* which aren't registered by libtiff itself. */
const char* field_name = fip->field_name;
- if( strncmp(fip->field_name, "Tag ", 4) == 0 ) {
+ if( fip->field_name != NULL && strncmp(fip->field_name, "Tag ", 4) == 0 ) {
for( size_t i = 0; i < NTAGS; ++i ) {
if( fip->field_tag == tagnames[i].tag ) {
field_name = tagnames[i].name;
@@ -149,7 +149,7 @@ _TIFFPrettyPrintField(TIFF* tif, const TIFFField *fip, FILE* fd, uint32_t tag,
(void) tif;
/* do not try to pretty print auto-defined fields */
- if (strncmp(fip->field_name,"Tag ", 4) == 0) {
+ if (fip->field_name != NULL && strncmp(fip->field_name,"Tag ", 4) == 0) {
return 0;
}