summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-03-01 11:12:45 +0000
committerMichael Stahl <mstahl@redhat.com>2017-03-03 20:57:33 +0000
commit92fcd775ef67df1c96a417151a60a94530379b8f (patch)
tree94fb4676d7a1bbbe99922693b8621cdb05a9071a /vcl
parent19561b0a54d0753db860e3b06b7b2ebba45a801c (diff)
ofz: Z_NEED_DICT is unsupported
Change-Id: Ib0945d5a4606915aff9ee3019203caaf2a3cc7c5 (cherry picked from commit aacaacc16938b030a1341d8dbaf56c6a2efeb1dc) Reviewed-on: https://gerrit.libreoffice.org/34744 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmpbin0 -> 110 bytes
-rw-r--r--vcl/source/gdi/dibtools.cxx5
2 files changed, 3 insertions, 2 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp b/vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp
new file mode 100644
index 000000000000..a75d6ebae540
--- /dev/null
+++ b/vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp
Binary files differ
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index f45fa3d206c8..c326632fe2a4 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -854,7 +854,8 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_u
// Seek behind the encoded block. There might have been bytes left or the codec might have read more than necessary.
rIStm.Seek(nCodedSize + nCodedPos);
}
- else
+
+ if (aData.empty())
{
// add something so we can take address of the first element
aData.resize(1);
@@ -863,7 +864,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_u
// set decoded bytes to memory stream,
// from which we will read the bitmap data
- pMemStm.reset( new SvMemoryStream);
+ pMemStm.reset(new SvMemoryStream);
pIStm = pMemStm.get();
assert(!aData.empty());
pMemStm->SetBuffer( &aData.front(), nUncodedSize, nUncodedSize );