Skip to content

Commit

Permalink
use >= instead to work around precision limitations of a double.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 23, 2024
1 parent 8f6186e commit 3252d47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion magick/image-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static inline size_t CastDoubleToUnsigned(const double x)
return(0);
}
value=floor(x);
if (value > ((double) MAGICK_SIZE_MAX))
if (value >= ((double) MAGICK_SIZE_MAX))
{
errno=ERANGE;
return((size_t) MAGICK_SIZE_MAX);
Expand Down

0 comments on commit 3252d47

Please sign in to comment.