mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-11-08 23:27:15 -05: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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user