From: Sam Russell Date: Tue, 2 Dec 2025 13:46:33 +0000 (+0100) Subject: Chorba: Fix edge case bug for >256KB input X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f729815718f63fac38205f84dcb6e635646b2e8;p=thirdparty%2Fzlib-ng.git Chorba: Fix edge case bug for >256KB input --- diff --git a/arch/generic/crc32_chorba_c.c b/arch/generic/crc32_chorba_c.c index 6f90d3c09..279aa747c 100644 --- a/arch/generic/crc32_chorba_c.c +++ b/arch/generic/crc32_chorba_c.c @@ -389,7 +389,7 @@ Z_INTERNAL uint32_t crc32_chorba_118960_nondestructive (uint32_t crc, const z_wo bitbuffer[(i / sizeof(z_word_t) + 20) % bitbuffersizezwords] ^= next21; bitbuffer[(i / sizeof(z_word_t) + 21) % bitbuffersizezwords] ^= next22; - for (int j = 14870; j < 14870 + 60; j++) { + for (int j = 14870; j < 14870 + 64; j++) { bitbuffer[(j + (i / sizeof(z_word_t))) % bitbuffersizezwords] = 0; }