diff options
author | Even Rouault <even.rouault@spatialys.com> | 2021-11-29 15:49:35 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2021-11-29 15:49:35 +0000 |
commit | 73dbd42c57aec1ef00b14735d34f35692e66063c (patch) | |
tree | ba0ab29dc4771cf2d0781fe6b82337da07cf0a8d | |
parent | 80b003420d4e657379f7c96a71d421abb68a1087 (diff) | |
parent | 4434975b678ded12dc73b86219074980a6c66112 (diff) | |
download | libtiff-git-73dbd42c57aec1ef00b14735d34f35692e66063c.tar.gz |
Merge branch 'add-null-check' into 'master'
Added missing null check.
See merge request libtiff/libtiff!274
-rw-r--r-- | libtiff/tif_print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c index 4e0082ae..db35e1c6 100644 --- a/libtiff/tif_print.c +++ b/libtiff/tif_print.c @@ -573,7 +573,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) const TIFFField *fip; uint32_t value_count; int mem_alloc = 0; - void *raw_data; + void *raw_data = NULL; fip = TIFFFieldWithTag(tif, tag); if(fip == NULL) @@ -637,7 +637,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) * _TIFFPrettyPrintField() fall down and print it as * any other tag. */ - if (!_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, raw_data)) + if (raw_data != NULL && !_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, raw_data)) _TIFFPrintField(fd, fip, value_count, raw_data); if(mem_alloc) |