16 lines
522 B
Diff
16 lines
522 B
Diff
--- gzip-1.3.3/unlzh.c.4335 1999-10-06 07:00:00.000000000 +0200
|
|
+++ gzip-1.3.3/unlzh.c 2006-09-07 09:41:41.000000000 +0200
|
|
@@ -149,7 +149,11 @@
|
|
unsigned i, k, len, ch, jutbits, avail, nextcode, mask;
|
|
|
|
for (i = 1; i <= 16; i++) count[i] = 0;
|
|
- for (i = 0; i < (unsigned)nchar; i++) count[bitlen[i]]++;
|
|
+ for (i = 0; i < (unsigned)nchar; i++) {
|
|
+ if (bitlen[i] > 16)
|
|
+ error("Bad table (case a)\n");
|
|
+ else count[bitlen[i]]++;
|
|
+ }
|
|
|
|
start[1] = 0;
|
|
for (i = 1; i <= 16; i++)
|