Skip to content

Commit 0314bb3

Browse files
authored
Merge pull request #8408 from radarhere/fli
2 parents 7e6e08e + fc65e43 commit 0314bb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libImaging/FliDecode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
224224
break;
225225
case 16:
226226
/* COPY chunk */
227-
if (INT32_MAX / state->xsize < state->ysize) {
227+
if (INT32_MAX < (uint64_t)state->xsize * state->ysize) {
228228
/* Integer overflow, bail */
229229
state->errcode = IMAGING_CODEC_OVERRUN;
230230
return -1;

0 commit comments

Comments
 (0)