Commit 45428b89 authored by Alexander Alekhin's avatar Alexander Alekhin

imgcodecs(tiff): avoid leak of helper struct on malformed inputs

oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13285
parent 360758e8
......@@ -214,6 +214,8 @@ bool TiffDecoder::readHeader()
&TiffDecoderBufHelper::write, &TiffDecoderBufHelper::seek,
&TiffDecoderBufHelper::close, &TiffDecoderBufHelper::size,
&TiffDecoderBufHelper::map, /*unmap=*/0 );
if (!tif)
delete buf_helper;
}
else
{
......
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