From e73d7ae0f0b5fb24e024a02de03485de728f8e5a Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 3 Apr 2018 14:39:27 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7330 --- MagickCore/fx.c | 2 +- MagickCore/property.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/MagickCore/fx.c b/MagickCore/fx.c index f6b42ad46..8d7d4d410 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -1825,7 +1825,7 @@ static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel, case 'z': { if (LocaleCompare(symbol,"z") == 0) - return((double)GetImageDepth(image, fx_info->exception)); + return((double) GetImageDepth(image,fx_info->exception)); break; } default: diff --git a/MagickCore/property.c b/MagickCore/property.c index f7f5f4dfc..b0f93ff4a 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -3654,6 +3654,8 @@ RestoreMSCWarning OptionWarning,"NoImageForProperty","\"%%[%s]\"",pattern); continue; /* else no image to retrieve artifact */ } + if ((image->columns == 0) || (image->rows == 0)) + break; fx_info=AcquireFxInfo(image,pattern+3,exception); status=FxEvaluateChannelExpression(fx_info,IntensityPixelChannel,0,0, &value,exception); -- 2.40.0