Commit 2ece029f authored by Alexander Alekhin's avatar Alexander Alekhin

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

backporting of commit: 45428b89
parent 68946510
......@@ -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