From 293050a91973bd6a6974eb852a43438d447a3801 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Sun, 11 Jul 2021 11:05:12 +0800 Subject: Handle Z_BUF_ERROR in decompress_dynamic --- core/io/compression.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/io/compression.cpp b/core/io/compression.cpp index 6de626db99..ca56509253 100644 --- a/core/io/compression.cpp +++ b/core/io/compression.cpp @@ -238,7 +238,10 @@ int Compression::decompress_dynamic(Vector *p_dst_vect, int p_max_dst_s case Z_DATA_ERROR: case Z_MEM_ERROR: case Z_STREAM_ERROR: - WARN_PRINT(strm.msg); + case Z_BUF_ERROR: + if (strm.msg) { + WARN_PRINT(strm.msg); + } (void)inflateEnd(&strm); p_dst_vect->resize(0); return ret; -- cgit v1.2.3