From 664966885c89a979c95ecbbf576db4a72d4c1145 Mon Sep 17 00:00:00 2001 From: Teemu Huovila Date: Thu, 30 Jan 2014 03:38:57 +0100 Subject: [PATCH] lib-compression: Fixed LZ4 maximum output buffer size --- src/lib-compression/ostream-lz4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }; -- 2.47.3