Verified Commit 802d3cbf authored by Thomas Bernard's avatar Thomas Bernard 💬
Browse files

TIFFWriteDirectoryTagTransferfunction() : fix NULL dereferencing

we must check the pointer is not NULL before memcmp() the memory
parent a0e273fd
......@@ -1893,12 +1893,14 @@ TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir
if (n==3)
if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[2],m*sizeof(uint16)))
if (tif->tif_dir.td_transferfunction[2] == NULL ||
if (n==2)
if (!_TIFFmemcmp(tif->tif_dir.td_transferfunction[0],tif->tif_dir.td_transferfunction[1],m*sizeof(uint16)))
if (tif->tif_dir.td_transferfunction[1] == NULL ||
if (n==0)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment