Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/3653
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed May 12, 2021
1 parent 62b736a commit 8e9b75e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion magick/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,9 @@ static inline MagickModulo VirtualPixelModulo(const ssize_t offset,
MagickModulo
modulo;

modulo.quotient=offset/((ssize_t) extent);
modulo.quotient=offset;
if (extent != 0)
modulo.quotient=offset/((ssize_t) extent);
modulo.remainder=offset % ((ssize_t) extent);
if ((modulo.remainder != 0) && ((offset ^ ((ssize_t) extent)) < 0))
{
Expand Down
4 changes: 0 additions & 4 deletions magick/utility-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ extern MagickPrivate MagickBooleanType
static inline int MagickReadDirectory(DIR *directory,struct dirent *entry,
struct dirent **result)
{
#if defined(MAGICKCORE_HAVE_READDIR_R)
return(readdir_r(directory,entry,result));
#else
(void) entry;
errno=0;
*result=readdir(directory);
return(errno);
#endif
}

/*
Expand Down

0 comments on commit 8e9b75e

Please sign in to comment.