Merge pull request #5659 from wiredfool/fli_framesize

This commit is contained in:
Hugo van Kemenade 2021-09-05 14:14:58 +03:00 committed by GitHub
commit 65b5f91b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;
}