Skip to content

Commit

Permalink
Merge pull request #8408 from radarhere/fli
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Sep 30, 2024
2 parents 7e6e08e + fc65e43 commit 0314bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libImaging/FliDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
break;
case 16:
/* COPY chunk */
if (INT32_MAX / state->xsize < state->ysize) {
if (INT32_MAX < (uint64_t)state->xsize * state->ysize) {
/* Integer overflow, bail */
state->errcode = IMAGING_CODEC_OVERRUN;
return -1;
Expand Down

0 comments on commit 0314bb3

Please sign in to comment.