diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2022-12-26 23:36:01 -0800 |
---|---|---|
committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2023-03-17 21:27:56 +0100 |
commit | 99674e057bbf274138d0aef21b79618ede2e99b3 (patch) | |
tree | 416b7584094a1c44b3be97407e87bebd26572f4f | |
parent | 8c4ef7b56be000b312f1af92fcf98666acfffb94 (diff) |
Fix crash when gzsetparams() attempted for transparent write.
gzsetparams() now returns a Z_STREAM_ERROR in this case.
-rw-r--r-- | gzwrite.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -460,7 +460,7 @@ int Z_EXPORT PREFIX(gzsetparams)(gzFile file, int level, int strategy) { strm = &(state->strm); /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) + if (state->mode != GZ_WRITE || state->err != Z_OK || state->direct) return Z_STREAM_ERROR; /* if no change is requested, then do nothing */ |