Kaydet (Commit) 7dbb98bf authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3540: oom move compression size test earlier

Change-Id: I1ca4f08ef526498cf08665f2b23d56095d5f1323
Reviewed-on: https://gerrit.libreoffice.org/43082Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2b6385a9
......@@ -1433,6 +1433,13 @@ bool TIFFReader::ReadTIFF(SvStream & rTIFF, Graphic & rGraphic )
if (nStart > nEndOfFile)
bStatus = false;
}
if (bStatus)
{
sal_uLong nTargetBits = nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes;
if (nTargetBits > SAL_MAX_UINT16)
bStatus = false;
}
}
else if ( nCompression == 5 )
{
......
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