From 717d581f9751f73e9a7cf69a02dfe73050add281 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 11 Dec 2025 17:16:35 -0500 Subject: crunch.c: Safety margin for outoput_buf --- src/crunch.c | 2 +- src/crunch.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crunch.c b/src/crunch.c index 82cc095..f572192 100644 --- a/src/crunch.c +++ b/src/crunch.c @@ -21,7 +21,7 @@ extern int opt_verbose; /* alf.c, -v = 1, -vv = 2 */ u8 input_buf[MAX_INPUT_SIZE]; -u8 output_buf[MAX_INPUT_SIZE]; +u8 output_buf[MAX_INPUT_SIZE + 3]; unsigned int input_len, output_len, out_bitpos; /* sizeof(short) on my machine is 2, so this is a 2MB table. diff --git a/src/crunch.h b/src/crunch.h index 4db2f1a..b977ede 100644 --- a/src/crunch.h +++ b/src/crunch.h @@ -1,7 +1,7 @@ #define MAX_INPUT_SIZE (1 << 24) extern u8 input_buf[MAX_INPUT_SIZE]; -extern u8 output_buf[MAX_INPUT_SIZE]; +extern u8 output_buf[MAX_INPUT_SIZE + 3]; extern unsigned int input_len, output_len, out_bitpos; void crunch(void); -- cgit v1.2.3