CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2026/03/03 22:44:14

Modified files:
        lib/libz       : compress.3 crc32.c zlib.h 

Log message:
ZLB-01-002: infinite loop in crc32_combine{,_op}()

zlib.h and our compress(3) manual have documented that len2 in the two
affected APIs must be non-negative for a long time.  If you ignore this,
you hang, as a simple test shows. The trivial fix adds a corresponding
check and makes the documentation even more explicit.

ok djm

commit ba829a458576d1ff0f26fc7230c6de816d1f6a77
Author: Mark Adler <[email protected]>
Date:   Sun Dec 21 18:17:56 2025 -0800

Check for negative lengths in crc32_combine functions.

Though zlib.h says that len2 must be non-negative, this avoids the
possibility of an accidental infinite loop.

Reply via email to