Skip to content

Commit

Permalink
Merge pull request #4752 from radarhere/warnings
Browse files Browse the repository at this point in the history
Fixed comparison warnings
  • Loading branch information
hugovk committed Oct 5, 2020
2 parents a7f384a + ffe566f commit c841501
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/libImaging/Jpeg2KDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,8 @@ j2k_decode_entry(Imaging im, ImagingCodecState state)
swapped), bail. */
if (tile_info.x0 >= tile_info.x1
|| tile_info.y0 >= tile_info.y1
|| tile_info.x0 < image->x0
|| tile_info.y0 < image->y0
|| tile_info.x0 < (OPJ_INT32)image->x0
|| tile_info.y0 < (OPJ_INT32)image->y0
|| tile_info.x1 - image->x0 > im->xsize
|| tile_info.y1 - image->y0 > im->ysize) {
state->errcode = IMAGING_CODEC_BROKEN;
Expand Down
2 changes: 1 addition & 1 deletion src/path.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ alloc_array(Py_ssize_t count)
PyErr_NoMemory();
return NULL;
}
if (count > (SIZE_MAX / (2 * sizeof(double))) - 1 ) {
if ((unsigned long long)count > (SIZE_MAX / (2 * sizeof(double))) - 1 ) {
PyErr_NoMemory();
return NULL;
}
Expand Down

0 comments on commit c841501

Please sign in to comment.