We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46aae40 commit f909a6aCopy full SHA for f909a6a
src/isal/isal_zlib.pyx
@@ -433,11 +433,8 @@ cdef class Decompress:
433
def decompress(self, data, Py_ssize_t max_length = 0):
434
435
cdef Py_ssize_t total_bytes = 0
436
- if max_length > UINT32_MAX:
437
- raise OverflowError("A maximum of 4 GB is allowed for the max "
438
- "length.")
439
- elif max_length == 0: # Zlib default
440
- max_length = UINT32_MAX
+ if max_length == 0:
+ max_length = PY_SSIZE_T_MAX
441
elif max_length < 0:
442
raise ValueError("max_length can not be smaller than 0")
443
0 commit comments