Actually check the framesize in FliDecode.

This commit is contained in:
Eric Soroos 2021-08-08 15:01:19 +02:00
parent 99940765b2
commit 8f300af691

View File

@ -46,7 +46,8 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
ptr = buf;
framesize = I32(ptr);
if (framesize < I32(ptr)) {
// there can be one pad byte in the framesize
if (bytes + (bytes % 2) < framesize) {
return 0;
}