From 7f888234088415a34c244f1fbe71dc68a8585186 Mon Sep 17 00:00:00 2001 From: sisong Date: Mon, 12 Aug 2024 20:25:47 +0800 Subject: [PATCH] fix re read head data for gzip when decompress multi concatenated gzip; --- programs/gzip_decompress_by_stream_mt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/gzip_decompress_by_stream_mt.cpp b/programs/gzip_decompress_by_stream_mt.cpp index 58375263..da01a35f 100644 --- a/programs/gzip_decompress_by_stream_mt.cpp +++ b/programs/gzip_decompress_by_stream_mt.cpp @@ -77,7 +77,7 @@ static int _gzip_decompress_by_stream(struct libdeflate_decompressor *d, {//gzip head if (code_cur+GZIP_MIN_OVERHEAD>code_buf_size) _read_code_from_file(); - ret=libdeflate_gzip_decompress_head(code_buf,code_buf_size-code_cur,&actual_in_nbytes_ret); + ret=libdeflate_gzip_decompress_head(code_buf+code_cur,code_buf_size-code_cur,&actual_in_nbytes_ret); _check_d(ret); code_cur+=actual_in_nbytes_ret; }