Merge pull request #50361 from timothyqiu/inflate-buf-error
Handle Z_BUF_ERROR in decompress_dynamic
This commit is contained in:
commit
88e35c88a1
1 changed files with 4 additions and 1 deletions
|
@ -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_DATA_ERROR:
|
||||||
case Z_MEM_ERROR:
|
case Z_MEM_ERROR:
|
||||||
case Z_STREAM_ERROR:
|
case Z_STREAM_ERROR:
|
||||||
WARN_PRINT(strm.msg);
|
case Z_BUF_ERROR:
|
||||||
|
if (strm.msg) {
|
||||||
|
WARN_PRINT(strm.msg);
|
||||||
|
}
|
||||||
(void)inflateEnd(&strm);
|
(void)inflateEnd(&strm);
|
||||||
p_dst_vect->resize(0);
|
p_dst_vect->resize(0);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue