mirror of
https://github.com/netwide-assembler/nasm.git
synced 2026-01-26 16:09:24 +00:00
zlib: pass 15 not 0 to inflateInit2()
The convention of passing 0 to inflateInit2() to autodetect the window size is not supported in really old versions of zlib. The only downside with simply passing in the maximum value (15) is potential additional memory buffer allocations, but it is a drop in the bucket for NASM. Fixes: https://github.com/netwide-assembler/nasm/issues/165 Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
parent
94923e1382
commit
acfeb7df6c
@ -40,7 +40,7 @@ char *uncompress_stdmac(macros_t *sm)
|
||||
zs.zalloc = nasm_z_alloc;
|
||||
zs.zfree = nasm_z_free;
|
||||
|
||||
if (inflateInit2(&zs, 0) != Z_OK)
|
||||
if (inflateInit2(&zs, 15) != Z_OK)
|
||||
panic();
|
||||
|
||||
if (inflate(&zs, Z_FINISH) != Z_STREAM_END)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user