1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5219: Fix zlib_decompress in Message.cc (#776)

This commit is contained in:
Pavel Czerný 2021-02-09 12:41:50 +01:00 committed by GitHub
parent bb2571e367
commit af55e166f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,8 @@ int zlib_decompress(const std::string& in, std::string& out)
rc = inflate(&zs, Z_FINISH);
if ( rc != Z_STREAM_END && rc != Z_OK )
if ( (rc != Z_STREAM_END && rc != Z_OK && rc != Z_BUF_ERROR)
|| (rc == Z_BUF_ERROR && zs.avail_out == ZBUFFER) )
{
inflateEnd(&zs);