[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - tools/source vcl/qa vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 3 20:58:13 UTC 2017
tools/source/zcodec/zcodec.cxx | 2 +-
vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp |binary
vcl/source/gdi/dibtools.cxx | 5 +++--
3 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 92fcd775ef67df1c96a417151a60a94530379b8f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 1 11:12:45 2017 +0000
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 at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index fcf8c21..6be21d6f 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -220,7 +220,7 @@ long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize )
}
err = mbStatus ? inflate(PZSTREAM, Z_NO_FLUSH) : Z_ERRNO;
- if ( err < 0 )
+ if (err < 0 || err == Z_NEED_DICT)
{
// Accept Z_BUF_ERROR as EAGAIN or EWOULDBLOCK.
mbStatus = (err == Z_BUF_ERROR);
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 0000000..a75d6eb
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp differ
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index f45fa3d..c326632 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 );
More information about the Libreoffice-commits
mailing list