summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-07-11 09:33:06 +0200
committerGitHub <noreply@github.com>2021-07-11 09:33:06 +0200
commit88e35c88a1a37ed6c925111b8019587ac092912a (patch)
tree6da790531c8c27b71f0550a3d094eb75c4633358
parent374ffbe2d2a7294dd9ea1429a3dec1eedfa34b60 (diff)
parent293050a91973bd6a6974eb852a43438d447a3801 (diff)
Merge pull request #50361 from timothyqiu/inflate-buf-error
Handle Z_BUF_ERROR in decompress_dynamic
-rw-r--r--core/io/compression.cpp5
1 files changed, 4 insertions, 1 deletions
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<uint8_t> *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;