diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-31 11:04:16 +0100 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:33 -0500 |
commit | c576b0e88bf036e5e37f13db72685e74e81b8c41 (patch) | |
tree | e5bb8a42fda56683147d1708b8c1c0ee7d954bd1 | |
parent | 053c0fcc0fc493699a12f1c75532b596a63f5686 (diff) |
ofz: 0 bitcount bmps are unsupported
Change-Id: Ibd7b25546006506350f9fc009596f2989a305a4c
(cherry picked from commit d6eaa8aa5211f1c140d7e9ed27a7fef806b4af3b)
(cherry picked from commit b8da9852dab1aa7942efb0c88390a01fc707fc15)
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index af5dae449af8..a0083c73c0c0 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -772,6 +772,10 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL if (!ImplReadDIBInfoHeader(rIStm, aHeader, bTopDown, bMSOFormat) && aHeader.nWidth && aHeader.nHeight && aHeader.nBitCount) return false; + //BI_BITCOUNT_0 jpeg/png is unsupported + if (aHeader.nBitCount == 0) + return false; + // In case ImplReadDIB() didn't call ImplReadDIBFileHeader() before // this method, nOffset is 0, that's OK. if (nOffset && aHeader.nSize > nOffset) |