madler / zlib

A massively spiffy yet delicately unobtrusive compression library.
http://zlib.net/
Other
5.46k stars 2.41k forks source link

Inconsistency with new LIT_MEM (likely bug) #973

Closed bsdphk closed 2 months ago

bsdphk commented 2 months ago

In deflate.c:

s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS);
s->pending_buf_size = (ulg)s->lit_bufsize * 4;

I think that '4' should also be LIT_BUFS ?

madler commented 2 months ago

No, it should be 4. If it were LIT_BUFS, then that would be a bug.