From 68f30da720bb46054d2abd9814622dd79a607e4d Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Thu, 21 Jan 2021 21:33:04 +0100 Subject: fix illegal array access --- src/lib/deflate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/deflate.cc b/src/lib/deflate.cc index 1349d48..e475419 100644 --- a/src/lib/deflate.cc +++ b/src/lib/deflate.cc @@ -250,7 +250,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