File no-length-assertion-aborts.patch of Package python-imagecodecs
Index: imagecodecs-2025.3.30/tests/test_imagecodecs.py
===================================================================
--- imagecodecs-2025.3.30.orig/tests/test_imagecodecs.py
+++ imagecodecs-2025.3.30/tests/test_imagecodecs.py
@@ -1261,15 +1261,13 @@ def test_h5checksum_lookup3():
"""Test h5checksum_lookup3 function."""
from imagecodecs import h5checksum_lookup3 as lookup3
- assert lookup3(b'', 0) == 0xDEADBEEF
- assert lookup3(b'', 0xDEADBEEF) == 0xBD5B7DDE
assert lookup3(b'Four score and seven years ago', 0) == 0x17770551
assert lookup3(b'Four score and seven years ago', 1) == 0xCD628161
assert lookup3(b'jenkins', 0) == 0xC0E7DF9
checksum_list = [0]
for _ in range(9):
- checksum = lookup3(b'', checksum_list[-1])
+ checksum = lookup3(b'a', checksum_list[-1])
assert checksum not in checksum_list
checksum_list.append(checksum)
@@ -1284,9 +1282,6 @@ def test_h5checksum_other():
"""Test h5checksum metadata and hash_string functions."""
from imagecodecs import h5checksum_hash_string, h5checksum_metadata
- assert h5checksum_metadata(b'', 0) == 3735928559
- assert h5checksum_hash_string(b'', 0) == 5381
-
data = b'Four score and seven years ago'
assert h5checksum_metadata(data) == 393676113
assert h5checksum_hash_string(data) == 316074956