[Libreoffice-commits] core.git: tools/source vcl/qa
Caolán McNamara
caolanm at redhat.com
Tue Nov 11 09:29:12 PST 2014
tools/source/zcodec/zcodec.cxx | 2 +-
vcl/qa/cppunit/graphicfilter/data/png/fail/afl-sample-Z_NEED_DICT.png |binary
2 files changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 047830de46fc40629dc9bdf1e8b9f427b6648c36
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 11 17:16:23 2014 +0000
There are three positive return codes from inflate
#define Z_OK 0
#define Z_STREAM_END 1
#define Z_NEED_DICT 2
and we don't support dictionaries, so a Z_NEED_DICT return
creates an infinite loop
Change-Id: Iafb1da594962b3cb456a3223cc6d4122791718c5
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 224963c..5069b7c 100644
--- a/tools/source/zcodec/zcodec.cxx
+++ b/tools/source/zcodec/zcodec.cxx
@@ -281,7 +281,7 @@ long ZCodec::ReadAsynchron( SvStream& rIStm, sal_uInt8* pData, sal_uIntPtr nSize
break;
}
}
- while ( (err != Z_STREAM_END) &&
+ while ( (err == Z_OK) &&
(PZSTREAM->avail_out != 0) &&
(PZSTREAM->avail_in || mnInToRead) );
if ( err == Z_STREAM_END )
diff --git a/vcl/qa/cppunit/graphicfilter/data/png/fail/afl-sample-Z_NEED_DICT.png b/vcl/qa/cppunit/graphicfilter/data/png/fail/afl-sample-Z_NEED_DICT.png
new file mode 100644
index 0000000..db8e7a8
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/png/fail/afl-sample-Z_NEED_DICT.png differ
More information about the Libreoffice-commits
mailing list