Skip to content

Commit

Permalink
Fall back to SW inflate when using gzopen()
Browse files Browse the repository at this point in the history
Fix an error that would cause all inflate calls from gzopen() to go to
the NX.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
  • Loading branch information
tuliom committed Jun 6, 2022
1 parent 94573fe commit d8295dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/nx_gzlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,10 @@ gzFile __gzopen(const char* path, int fd, const char *mode, int force_nx)

is_deflate = true;
} else {
err = nx_inflateInit(stream);
if (force_nx)
err = nx_inflateInit(stream);
else
err = inflateInit(stream);
is_deflate = false;
if (err == Z_OK) {
state->buf = malloc(BUF_LEN);
Expand Down

0 comments on commit d8295dd

Please sign in to comment.