[Zlib-devel] zlib 1.2.3.5 available for testing
Török Edwin
edwintorok at gmail.com
Fri Jan 8 05:11:33 EST 2010
On 2010-01-08 10:58, Mark Adler wrote:
> Generous zlib testers,
>
> zlib 1.2.3.5 is available here for testing:
>
> http://zlib.net/current/beta/zlib-1.2.3.5.tar.gz
>
> The changes are listed in ChangeLog. Most notably, the gz* functions have been replaced with entirely new code. If you can, please test those with special vigor. Thanks.
>
Hi,
I have built zlib-1.2.3.5 on Linux/x86-64 and noticed two possible issues:
1. Portability
gzread.c:425:13: warning: use of GNU void* extension [-Wpointer-arith]
buf += n;
~~~ ^ ~
gzwrite.c:195:17: warning: use of GNU void* extension [-Wpointer-arith]
buf += n;
~~~ ^ ~
2. Free of constant string
I also noticed these warnings:
gzread.c:121: warning: passing argument 3 of ‘gz_error’ discards
qualifiers from pointer target type
gzguts.h:109: note: expected ‘char *’ but argument is of type ‘const char *’
gz_error(state, Z_DATA_ERROR, "unexpected end of file");
I think that will cause gz_error to try and free the constant string on
its next invocation (which will likely result in a crash).
The only special case I see in gz_error() is for Z_MEM_ERROR, in all
other situations it tries to free an already existing message.
Perhaps there should be another field in the state structure that tells
whether to free the message or not?
Except for these 2 issues the new zlib is working fine! I haven't found
any other problems so far.
Best regards,
--Edwin
More information about the Zlib-devel
mailing list