Skip to content

Commit 0d7029f

Browse files
committed
Set lencode and distcode symmetrically
As reported by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=70617 and madler#997
1 parent 51b7f2a commit 0d7029f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inflate.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,7 @@ int ZEXPORT inflate(z_streamp strm, int flush) {
923923
while (state->have < 19)
924924
state->lens[order[state->have++]] = 0;
925925
state->next = state->codes;
926-
state->lencode = (const code FAR *)(state->next);
926+
state->lencode = state->distcode = (const code FAR *)(state->next);
927927
state->lenbits = 7;
928928
ret = inflate_table(CODES, state->lens, 19, &(state->next),
929929
&(state->lenbits), state->work);

0 commit comments

Comments
 (0)