mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-19 16:15:07 +00:00
If the len2 argument to crc32_combine() is zero, then the crc2 argument must also be zero. fast_crc32_combine() explicitly checks for len2==0, in which case it ignores crc2 (which is the same as if it were zero). zlib's crc32_combine() used to have that check prior to version 1.2.12, but then lost it, making its necessary for callers to be more careful. Also add the len2==0 check to the dummy fast_crc32_combine() implementation, because it delegates to zlib's. Signed-off-by: Michael Livshin <michael.livshin@scylladb.com> Closes #10731