Skip to content

Commit

Permalink
account for boundary condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Sep 8, 2023
1 parent c5bc4b0 commit cec3678
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magick/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,7 @@ static inline MagickBooleanType IsOffsetOverflow(const ssize_t y,
{
if ((y == 0) || (columns == 0))
return(MagickFalse);
if (y > (ssize_t) (MAGICK_SSIZE_MAX/columns))
if (y >= (ssize_t) (MAGICK_SSIZE_MAX/columns))
return(MagickTrue);
return(MagickFalse);
}
Expand Down

0 comments on commit cec3678

Please sign in to comment.