]> granicus.if.org Git - imagemagick/commitdiff
When the exception list limit has been reached and the current exception is an error...
authorDirk Lemstra <dirk@lemstra.org>
Fri, 11 Jan 2019 08:58:30 +0000 (09:58 +0100)
committerDirk Lemstra <dirk@lemstra.org>
Fri, 11 Jan 2019 08:58:30 +0000 (09:58 +0100)
MagickCore/exception.c

index dcd960f0c2bba34bccff49546420118c8e8b2b29..e7d4d5a92cd8148f4443047a7cd9de870184fa60 100644 (file)
@@ -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) &&