From a396ea844a1d831c788e9958ee0ba1850c54524b Mon Sep 17 00:00:00 2001 From: edisenwang <114474163@qq.com> Date: Sat, 20 Apr 2024 15:34:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=AF=E8=83=BD=E5=BC=95?= =?UTF-8?q?=E8=B5=B7=E7=9A=84=E5=A0=86=E5=86=85=E5=AD=98=E6=B3=84=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- util/src/tc_gzip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/src/tc_gzip.cpp b/util/src/tc_gzip.cpp index a77b090a..2f0f441b 100644 --- a/util/src/tc_gzip.cpp +++ b/util/src/tc_gzip.cpp @@ -42,7 +42,7 @@ bool TC_GZip::compress(const char *src, size_t length, string& buffer) static char gz_simple_header[] = { '\037', '\213', '\010', '\000', '\000', '\000', '\000', '\000', '\002', '\377' }; size_t destLen = sizeof(gz_simple_header) + length * 2; - char *out = new char[destLen + 1]; + char *out = new char[destLen + 1 + 8]; stream.next_out = (Bytef *)out; stream.avail_out = destLen;