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 bae0398c7f4516b773d62788d61807c0c9d5d0f0 Author: Caolán McNamara <[email protected]> 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 (cherry picked from commit 047830de46fc40629dc9bdf1e8b9f427b6648c36) Reviewed-on: https://gerrit.libreoffice.org/12366 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Michael Stahl <[email protected]> diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx index 2e9ad1f..bc50d5c 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
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
