From: Teemu Huovila Date: Thu, 30 Jan 2014 02:38:57 +0000 (+0100) Subject: lib-compression: Fixed LZ4 maximum output buffer size X-Git-Tag: 2.2.11~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=664966885c89a979c95ecbbf576db4a72d4c1145;p=thirdparty%2Fdovecot%2Fcore.git lib-compression: Fixed LZ4 maximum output buffer size --- diff --git a/src/lib-compression/ostream-lz4.c b/src/lib-compression/ostream-lz4.c index 90aa2abc01..81ac0981f4 100644 --- a/src/lib-compression/ostream-lz4.c +++ b/src/lib-compression/ostream-lz4.c @@ -18,7 +18,7 @@ struct lz4_ostream { unsigned int compressbuf_offset; /* chunk size, followed by compressed data */ - unsigned char outbuf[IOSTREAM_LZ4_CHUNK_PREFIX_LEN + CHUNK_SIZE]; + unsigned char outbuf[IOSTREAM_LZ4_CHUNK_PREFIX_LEN + LZ4_COMPRESSBOUND(CHUNK_SIZE)]; unsigned int outbuf_offset, outbuf_used; };