Skip to content

Commit 94c8473

Browse files
Allow dest size of 0 in block decompress (python#27)
1 parent 1f49adf commit 94c8473

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lz4/block/_block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ decompress (PyObject * Py_UNUSED (self), PyObject * args, PyObject * kwargs)
253253
source_size -= hdr_size;
254254
}
255255

256-
if (dest_size <= 0 || dest_size > PY_SSIZE_T_MAX)
256+
if (dest_size < 0 || dest_size > PY_SSIZE_T_MAX)
257257
{
258258
PyErr_Format (PyExc_ValueError, "Invalid size in header: 0x%zu",
259259
dest_size);

0 commit comments

Comments
 (0)