diff --git a/magick/fourier.c b/magick/fourier.c
index c633e74..9b8a3ed 100644
--- a/magick/fourier.c
+++ b/magick/fourier.c
@@ -1064,8 +1064,10 @@
image_view=AcquireCacheView(image);
for (y=0L; y < (ssize_t) fourier_info->height; y++)
{
- q=GetCacheViewAuthenticPixels(image_view,0L,y,fourier_info->width,1UL,
- exception);
+ if (y >= (ssize_t) image->rows)
+ break;
+ q=GetCacheViewAuthenticPixels(image_view,0L,y,fourier_info->width >
+ image->columns ? image->columns : fourier_info->width,1UL,exception);
if (q == (PixelPacket *) NULL)
break;
indexes=GetCacheViewAuthenticIndexQueue(image_view);