diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-03-01 11:12:45 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-03-06 16:08:01 +0100 |
commit | 1d76f7103052ccd3ac29f7359272ebcad64ddc49 (patch) | |
tree | 4f9df33989e23f18d325972b689e769a9753cd74 /vcl | |
parent | ae0b62742b5f17d5c7daa6253a0012db31f7d0bc (diff) |
ofz: Z_NEED_DICT is unsupported
Change-Id: Ib0945d5a4606915aff9ee3019203caaf2a3cc7c5
(cherry picked from commit aacaacc16938b030a1341d8dbaf56c6a2efeb1dc)
Reviewed-on: https://gerrit.libreoffice.org/34743
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 6f3cc872c58d8b34ca9f0a06f2d65b3b6cc1c7ee)
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp | bin | 0 -> 110 bytes | |||
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 5 |
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 Binary files differnew file mode 100644 index 000000000000..a75d6ebae540 --- /dev/null +++ b/vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 6bf5843fcdc5..7047fcf5209b 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -853,7 +853,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); @@ -862,7 +863,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 ); |