From: Dirk Lemstra Date: Fri, 11 Jan 2019 08:58:30 +0000 (+0100) Subject: When the exception list limit has been reached and the current exception is an error... X-Git-Tag: 7.0.8-24~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=70551314f8f9cd6664044e0114278d036fd58606;p=imagemagick When the exception list limit has been reached and the current exception is an error we allow one extra exception to make sure an error is thrown. --- diff --git a/MagickCore/exception.c b/MagickCore/exception.c index dcd960f0c..e7d4d5a92 100644 --- a/MagickCore/exception.c +++ b/MagickCore/exception.c @@ -933,8 +933,17 @@ MagickExport MagickBooleanType ThrowException(ExceptionInfo *exception, exceptions=(LinkedListInfo *) exception->exceptions; if (GetNumberOfElementsInLinkedList(exceptions) > MaxExceptionList) { - UnlockSemaphoreInfo(exception->semaphore); - return(MagickTrue); + if (severity < ErrorException) + { + UnlockSemaphoreInfo(exception->semaphore); + return(MagickTrue); + } + p=(ExceptionInfo *) GetLastValueInLinkedList(exceptions); + if (p->severity >= ErrorException) + { + UnlockSemaphoreInfo(exception->semaphore); + return(MagickTrue); + } } p=(ExceptionInfo *) GetLastValueInLinkedList(exceptions); if ((p != (ExceptionInfo *) NULL) && (p->severity == severity) &&