summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-01-21 21:32:21 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-01-21 21:32:21 +0100
commit9111595e23eadfc005d2b75dd7b48a65324bf7fa (patch)
tree8d2082d35da52009dfd836d641c24f43a3edc381
parent79eb1dc8436e55c11936d923512b4c480a90fe85 (diff)
Fix illegal array access
-rw-r--r--src/deflate.c2
1 files changed, 1 insertions, 1 deletions
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++;
}
}