WMF import: restore support for the ImplReadDIB(bFileHeader=false) version

Regression from commit f7799c9317
(Resolves: #i124467# add check for image data offset..., 2014-03-28).

Change-Id: I71e78aefca2ca5b07f763ec798226b9bb39a5254
This commit is contained in:
Miklos Vajna
2014-04-04 17:29:02 +02:00
parent e7c0f8711f
commit 9984807f17
2 changed files with 3 additions and 1 deletions

View File

@@ -605,7 +605,9 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
if(ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount)
{
if (aHeader.nSize > nOffset)
// In case ImplReadDIB() didn't call ImplReadDIBFileHeader() before
// this method, nOffset is 0, that's OK.
if (nOffset && aHeader.nSize > nOffset)
{
// Header size claims to extend into the image data.
// Looks like an error.