mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:23:30 +03:00
zlib: enforce full initialization of our data space z_stream structs
This commit is contained in:
parent
1833984664
commit
9afb343368
2 changed files with 3 additions and 13 deletions
|
|
@ -177,11 +177,9 @@ void hugehelp(void)
|
|||
return;
|
||||
|
||||
headerlen = 10;
|
||||
memset(&z, 0, sizeof(z_stream));
|
||||
z.avail_in = (unsigned int)(sizeof(hugehelpgz) - headerlen);
|
||||
z.next_in = (unsigned char *)hugehelpgz + headerlen;
|
||||
z.zalloc = (alloc_func)Z_NULL;
|
||||
z.zfree = (free_func)Z_NULL;
|
||||
z.opaque = 0;
|
||||
|
||||
if (inflateInit2(&z, -MAX_WBITS) != Z_OK)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue