Skip to content

Commit b65bc40

Browse files
committed
Fixed comparison warning
1 parent f5ab7bb commit b65bc40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libImaging/FliDecode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
4949

5050
framesize = I32(ptr);
5151
// there can be one pad byte in the framesize
52-
if (bytes + (bytes % 2) < framesize) {
52+
if ((unsigned)(bytes + (bytes % 2)) < framesize) {
5353
return 0;
5454
}
5555

@@ -259,7 +259,7 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
259259
state->errcode = IMAGING_CODEC_BROKEN;
260260
return -1;
261261
}
262-
if (advance < 0 || advance > bytes) {
262+
if (advance < 0 || advance > (unsigned)bytes) {
263263
state->errcode = IMAGING_CODEC_OVERRUN;
264264
return -1;
265265
}

0 commit comments

Comments
 (0)