Skip to content

Commit 59620fa

Browse files
committed
Make sure zdict cannot be excessively large
1 parent 550e010 commit 59620fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/isal/isal_zlibmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ ParallelCompress_compress_and_crc(ParallelCompress *self,
396396
return NULL;
397397
}
398398

399-
if (data.len > UINT32_MAX) {
399+
if (data.len + zdict.len > UINT32_MAX) {
400400
PyErr_Format(PyExc_OverflowError,
401401
"Can only compress %d bytes of data", UINT32_MAX);
402402
goto error;

0 commit comments

Comments
 (0)