From: Michael Wallner Date: Tue, 11 Oct 2005 07:49:03 +0000 (+0000) Subject: - we need a bit more space for the footer too in http_gzencode() X-Git-Tag: RELEASE_0_15_0~9 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=d2d92ed054055987568b9c1b205b558ab8937ed4;p=m6w6%2Fext-http - we need a bit more space for the footer too in http_gzencode() --- diff --git a/http_encoding_api.c b/http_encoding_api.c index f0328cd..69b6721 100644 --- a/http_encoding_api.c +++ b/http_encoding_api.c @@ -120,7 +120,7 @@ inline void http_init_gzencode_buffer(z_stream *Z, const char *data, size_t data Z->avail_in = data_len; Z->avail_out = HTTP_GZBUFLEN(data_len) + HTTP_GZSAFPAD - 1; - *buf_ptr = emalloc(HTTP_GZBUFLEN(data_len) + sizeof(http_gzencode_header)); + *buf_ptr = emalloc(HTTP_GZBUFLEN(data_len) + sizeof(http_gzencode_header) + HTTP_GZSAFPAD); memcpy(*buf_ptr, http_gzencode_header, sizeof(http_gzencode_header)); Z->next_out = *buf_ptr + sizeof(http_gzencode_header);