X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_encoding_api.c;h=4d08e71c2c2bf5e582e74b0ae31c0dd33512489c;hp=a8d3ec0e048c6a6e96f97d5c3bdc3e1186734c03;hb=4c47eabee60a0266f3f27bf91528830b32da842e;hpb=ac76ec181d08202752bce22300fd8005efb1947c diff --git a/http_encoding_api.c b/http_encoding_api.c index a8d3ec0..4d08e71 100644 --- a/http_encoding_api.c +++ b/http_encoding_api.c @@ -261,6 +261,11 @@ inline STATUS http_verify_gzencode_buffer(const char *data, size_t data_len, con } } + if (data_len < offset + 8) { + http_error(error_level TSRMLS_CC, HTTP_E_ENCODING, "Missing or truncated GZIP footer"); + return FAILURE; + } + if (encoded) { *encoded = data + offset; }