Sven Strickroth asked whether zlib 1.4 affects Git. The release fixes security issues but also makes potentially breaking changes. He wrote "glib", and Patrick Steinhardt noted he presumably meant Git.

Steinhardt said the breaking change is contained to raw deflate, which Git uses only in archive-zip.c. Since Z_STREAM_END can only trigger with Z_FINISH, only two loops in that file need checking.

The first allocates a buffer sized to an estimated maximum, then calls git_deflate() with Z_FINISH in a loop while the result is Z_OK. Steinhardt judged this fine. Because Git estimates the upper bound and compresses everything into that buffer, the output is written there as expected even when Z_STREAM_END is seen.

The excerpt cuts off while he is describing the second loop, so the thread's conclusion on it is not shown here. No patch has been posted.