Null-dereference READ in TIFFPrintDirectory
Summary
For custom tags there seems to be a missing null check inside the TIFFPrintDirectory
method. The value of raw_data
(https://gitlab.com/libtiff/libtiff/-/blob/80b003420d4e657379f7c96a71d421abb68a1087/libtiff/tif_print.c#L576) can be null when _TIFFPrettyPrintField
and _TIFFPrintField
are being called. And also undefined when fip->field_passcount
is not zero.
Version
4.3.0
Steps to reproduce
The issue can be reproduced with this file:
clusterfuzz-testcase-minimized-ping_tiff64_fuzzer-5594621221666816.fuzz (with tag 37382)
Platform
Windows x64 Visual Studio 2019