X-Git-Url: https://git.cworth.org/git?p=gzip;a=blobdiff_plain;f=inflate.c;h=2f4954be020fd9a9eaf0da4015ca8ee465e6dcc5;hp=9f3a6616e18e1ca70eaa0c1b88bde43a0209211c;hb=HEAD;hpb=80351b321c1ee7853366b158d38225efbde25ac6 diff --git a/inflate.c b/inflate.c index 9f3a661..2f4954b 100644 --- a/inflate.c +++ b/inflate.c @@ -335,13 +335,15 @@ int *m; /* maximum lookup bits, returns actual */ } while (--i); if (c[0] == n) /* null input--all zero length codes */ { - q = (struct huft *) malloc (2 * sizeof *q); + q = (struct huft *) malloc (3 * sizeof *q); if (!q) return 3; - hufts += 2; + hufts += 3; q[0].v.t = (struct huft *) NULL; q[1].e = 99; /* invalid code marker */ q[1].b = 1; + q[2].e = 99; /* invalid code marker */ + q[2].b = 1; *t = q + 1; *m = 1; return 0;