TIFFReadCustomDirectory(): fix potential heap buffer overflow when reading a custom directory, after a regular directory where a codec was active. Fixes https://gitlab.com/libtiff/libtiff/issues/178
This commit is contained in:
parent
18ca4b4276
commit
25b274126d
@ -4441,6 +4441,7 @@ TIFFReadCustomDirectory(TIFF* tif, toff_t diroff,
|
||||
uint16 di;
|
||||
const TIFFField* fip;
|
||||
uint32 fii;
|
||||
(*tif->tif_cleanup)(tif); /* cleanup any previous compression state */
|
||||
_TIFFSetupFields(tif, infoarray);
|
||||
dircount=TIFFFetchDirectory(tif,diroff,&dir,NULL);
|
||||
if (!dircount)
|
||||
|
Loading…
Reference in New Issue
Block a user