diff options
author | W. Felix Handte <w@felixhandte.com> | 2018-04-18 19:38:41 (GMT) |
---|---|---|
committer | W. Felix Handte <w@felixhandte.com> | 2018-04-20 00:45:48 (GMT) |
commit | e0d8add7917f5eafa4894979b5b68b0db1fea6f4 (patch) | |
tree | f57bcc957a8b4b5e657d20b817916612950426e0 | |
parent | 9dae661b1fcc665a78a9de5341e651310d489f5c (diff) | |
download | lz4-e0d8add7917f5eafa4894979b5b68b0db1fea6f4.zip lz4-e0d8add7917f5eafa4894979b5b68b0db1fea6f4.tar.gz lz4-e0d8add7917f5eafa4894979b5b68b0db1fea6f4.tar.bz2 |
Fix Framebench Output Buffer Sizing
-rw-r--r-- | tests/framebench.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/framebench.c b/tests/framebench.c index 70cfec5..9752f23 100644 --- a/tests/framebench.c +++ b/tests/framebench.c @@ -347,6 +347,9 @@ int main(int argc, char *argv[]) { options.stableSrc = 1; out_size = LZ4F_compressFrameBound(in_size, &prefs); + if ((size_t)LZ4_compressBound(in_size) > out_size) { + out_size = LZ4_compressBound(in_size); + } out_buf = (char *)malloc(out_size); if (!out_buf) return 1; |