File ImageMagick-CVE-2018-16328.patch of Package ImageMagick.11105
diff --git a/MagickCore/log.c b/MagickCore/log.c
index 57bc7ce37b..8ca5c1af2b 100644
--- a/MagickCore/log.c
+++ b/MagickCore/log.c
@@ -673,7 +673,8 @@ static inline void CheckEventLogging()
ResetLinkedListIterator(log_cache);
p=(LogInfo *) GetNextValueInLinkedList(log_cache);
- event_logging=p->event_mask != NoEvents ? MagickTrue: MagickFalse;
+ event_logging=(p != (LogInfo *) NULL) && (p->event_mask != NoEvents) ?
+ MagickTrue: MagickFalse;
}
}