summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Wellons <wellons@nullprogram.com>2017-10-08 16:41:12 -0400
committerChristopher Wellons <wellons@nullprogram.com>2017-10-08 16:42:25 -0400
commitce3f8ac69ece118a88240dfa29554a279e926364 (patch)
tree4fe17b0af07a52b000bc849a86ccf9c8122e290d
parentda86c3076c0adf5d0ae8026b3a44942def657b6a (diff)
Fix overflow bug (thanks to Impossibly Stupid)
-rw-r--r--test/benchmark.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/benchmark.c b/test/benchmark.c
index 4e93408..ffb14b3 100644
--- a/test/benchmark.c
+++ b/test/benchmark.c
@@ -118,7 +118,7 @@ main(void)
long errors, n;
size_t z = BUFLEN * 1024L * 1024;
unsigned char *buffer = malloc(z);
- unsigned char *end = buffer_fill(buffer, z);
+ unsigned char *end = buffer_fill(buffer, z - 4);
/* Benchmark the branchless decoder */
running = 1;