blob: 7b9172c2eb2120aceb3675e05f65022cedb3ddc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
https://bugs.gentoo.org/981308
https://marc.info/?l=oss-security&m=178750295349970&w=4
--- a/unlzh.c
+++ b/unlzh.c
@@ -307,6 +307,12 @@ decode_p ()
static void
huf_decode_start ()
{
+ /* Needed in case LEFT and RIGHT are reused from a previous
+ LZW decompression. It may be overkill to clear all of both
+ arrays, but nobody has had time to analyze this carefully. */
+ memzero (left, (2 * NC - 1) * sizeof *left);
+ memzero (right, (2 * NC - 1) * sizeof *right);
+
init_getbits(); blocksize = 0;
}
|