Fix comparison warnings (#9541)
This commit is contained in:
commit
fcf033bdfb
@ -49,7 +49,7 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
|
||||
|
||||
framesize = I32(ptr);
|
||||
// there can be one pad byte in the framesize
|
||||
if (bytes + (bytes % 2) < framesize) {
|
||||
if ((unsigned)(bytes + (bytes % 2)) < framesize) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -259,7 +259,7 @@ ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t byt
|
||||
state->errcode = IMAGING_CODEC_BROKEN;
|
||||
return -1;
|
||||
}
|
||||
if (advance < 0 || advance > bytes) {
|
||||
if (advance < 0 || advance > (unsigned)bytes) {
|
||||
state->errcode = IMAGING_CODEC_OVERRUN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user