ofz#3750 Undefined-shift

Change-Id: If227dea7758c22cadfad83192e0ad31a4183b5b5
Reviewed-on: https://gerrit.libreoffice.org/43747
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2017-10-24 10:49:06 +01:00
parent 0b47baca10
commit d5a37cd8af

View File

@@ -773,13 +773,16 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL
const sal_uLong nStmPos = rIStm.Tell();
bool bTopDown(false);
if (!ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown, bMSOFormat) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount)
if (!ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown, bMSOFormat))
return false;
//BI_BITCOUNT_0 jpeg/png is unsupported
if (aHeader.nBitCount == 0)
return false;
if (aHeader.nWidth <= 0 || aHeader.nHeight <= 0)
return false;
// In case ImplReadDIB() didn't call ImplReadDIBFileHeader() before
// this method, nOffset is 0, that's OK.
if (nOffset && aHeader.nSize > nOffset)