summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-11 17:16:23 +0000
committerAndras Timar <andras.timar@collabora.com>2014-11-23 14:32:21 +0100
commit9515ee1b4eba3aec76c0905cedf2557b4fadba54 (patch)
treeeb16a3cd271fc989dd0318389ee588f3d184ebb1 /tools
parent7495f84e47277f119bacd05bba252afd7c55bd66 (diff)
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 <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/zcodec/zcodec.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/zcodec/zcodec.cxx b/tools/source/zcodec/zcodec.cxx
index 2e9ad1ff896a..bc50d5cb7df1 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 )