summaryrefslogtreecommitdiff
path: root/libtiff/tif_print.c
diff options
context:
space:
mode:
authorbfriesen <bfriesen>2009-08-24 16:51:14 +0000
committerbfriesen <bfriesen>2009-08-24 16:51:14 +0000
commitd73f792677f9cfc24fa82ff2f36cf36de23fe06b (patch)
tree02d3bb6ed01b246f61ccdbd3d3374853adbab653 /libtiff/tif_print.c
parentd414055646afb01404987b602e9eea75cadd06cb (diff)
downloadlibtiff-d73f792677f9cfc24fa82ff2f36cf36de23fe06b.tar.gz
* libtiff/tif_print.c (TIFFPrintDirectory): Apply fix from Jay
Berkenbilt for "Bug 2024 - possible null pointer dereference with one-line fix". http://bugzilla.maptools.org/show_bug.cgi?id=2024
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 a1777f9d..4b199649 100644
--- a/libtiff/tif_print.c
+++ b/libtiff/tif_print.c
@@ -1,4 +1,4 @@
-/* $Id: tif_print.c,v 1.47 2007-07-19 15:31:20 dron Exp $ */
+/* $Id: tif_print.c,v 1.48 2009-08-24 16:51:14 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -513,7 +513,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
} else
fprintf(fd, "(present)\n");
}
- if (TIFFFieldSet(tif, FIELD_SUBIFD)) {
+ if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) {
fprintf(fd, " SubIFD Offsets:");
for (i = 0; i < td->td_nsubifd; i++)
#if defined(__WIN32__) && defined(_MSC_VER)