From 9111595e23eadfc005d2b75dd7b48a65324bf7fa Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 21 Jan 2021 21:32:21 +0100 Subject: Fix illegal array access --- src/deflate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deflate.c b/src/deflate.c index 2af8245..072cc97 100644 --- a/src/deflate.c +++ b/src/deflate.c @@ -252,7 +252,7 @@ static int8_t deflate_huffman(uint8_t * ll_lengths, uint16_t ll_size, return DEFLATE_ERR_OUTPUT_LENGTH; } deflate_output_now[0] = - deflate_output_now[-dist_val]; + *(deflate_output_now - dist_val); deflate_output_now++; } } -- cgit v1.2.3