ofz: Z_NEED_DICT is unsupported
Change-Id: Ib0945d5a4606915aff9ee3019203caaf2a3cc7c5
This commit is contained in:
@@ -222,7 +222,7 @@ long ZCodec::Read( SvStream& rIStm, sal_uInt8* pData, sal_uInt32 nSize )
|
|||||||
|
|
||||||
}
|
}
|
||||||
err = mbStatus ? inflate(PZSTREAM, Z_NO_FLUSH) : Z_ERRNO;
|
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.
|
// Accept Z_BUF_ERROR as EAGAIN or EWOULDBLOCK.
|
||||||
mbStatus = (err == Z_BUF_ERROR);
|
mbStatus = (err == Z_BUF_ERROR);
|
||||||
|
BIN
vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp
Normal file
BIN
vcl/qa/cppunit/graphicfilter/data/bmp/fail/nodict-compress.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 B |
@@ -841,7 +841,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.
|
// Seek behind the encoded block. There might have been bytes left or the codec might have read more than necessary.
|
||||||
rIStm.Seek(nCodedSize + nCodedPos);
|
rIStm.Seek(nCodedSize + nCodedPos);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (aData.empty())
|
||||||
{
|
{
|
||||||
// add something so we can take address of the first element
|
// add something so we can take address of the first element
|
||||||
aData.resize(1);
|
aData.resize(1);
|
||||||
@@ -850,7 +851,7 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_u
|
|||||||
|
|
||||||
// set decoded bytes to memory stream,
|
// set decoded bytes to memory stream,
|
||||||
// from which we will read the bitmap data
|
// from which we will read the bitmap data
|
||||||
pMemStm.reset( new SvMemoryStream);
|
pMemStm.reset(new SvMemoryStream);
|
||||||
pIStm = pMemStm.get();
|
pIStm = pMemStm.get();
|
||||||
assert(!aData.empty());
|
assert(!aData.empty());
|
||||||
pMemStm->SetBuffer(aData.data(), nUncodedSize, nUncodedSize);
|
pMemStm->SetBuffer(aData.data(), nUncodedSize, nUncodedSize);
|
||||||
|
Reference in New Issue
Block a user