Skip to content

Commit

Permalink
Zlib patch: prevent uninitialized use of state->check
Browse files Browse the repository at this point in the history
  • Loading branch information
SuzyWangIBMer authored and al13n321 committed Jun 24, 2024
1 parent 0c1c748 commit ace9555
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1295,6 +1295,8 @@ int32_t Z_EXPORT PREFIX(inflateSync)(PREFIX3(stream) *strm) {
/* return no joy or set up to restart inflate() on a new block */
if (state->have != 4)
return Z_DATA_ERROR;
if (state->mode == HEAD)
state->wrap = 0;
if (state->flags == -1)
state->wrap = 0; /* if no header yet, treat as raw */
else
Expand Down

0 comments on commit ace9555

Please sign in to comment.