summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/framebench.c3
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;