mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Merge pull request #4752 from radarhere/warnings
Fixed comparison warnings
This commit is contained in:
commit
c841501c34
|
@ -742,8 +742,8 @@ j2k_decode_entry(Imaging im, ImagingCodecState state)
|
||||||
swapped), bail. */
|
swapped), bail. */
|
||||||
if (tile_info.x0 >= tile_info.x1
|
if (tile_info.x0 >= tile_info.x1
|
||||||
|| tile_info.y0 >= tile_info.y1
|
|| tile_info.y0 >= tile_info.y1
|
||||||
|| tile_info.x0 < image->x0
|
|| tile_info.x0 < (OPJ_INT32)image->x0
|
||||||
|| tile_info.y0 < image->y0
|
|| tile_info.y0 < (OPJ_INT32)image->y0
|
||||||
|| tile_info.x1 - image->x0 > im->xsize
|
|| tile_info.x1 - image->x0 > im->xsize
|
||||||
|| tile_info.y1 - image->y0 > im->ysize) {
|
|| tile_info.y1 - image->y0 > im->ysize) {
|
||||||
state->errcode = IMAGING_CODEC_BROKEN;
|
state->errcode = IMAGING_CODEC_BROKEN;
|
||||||
|
|
|
@ -56,7 +56,7 @@ alloc_array(Py_ssize_t count)
|
||||||
PyErr_NoMemory();
|
PyErr_NoMemory();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (count > (SIZE_MAX / (2 * sizeof(double))) - 1 ) {
|
if ((unsigned long long)count > (SIZE_MAX / (2 * sizeof(double))) - 1 ) {
|
||||||
PyErr_NoMemory();
|
PyErr_NoMemory();
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user