{
if ((index < 0) || (index >= (ssize_t) image->colors))
{
- (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError,
- "InvalidColormapIndex","`%s'",image->filename);
+ if (exception->severity != CorruptImageError)
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ CorruptImageError,"InvalidColormapIndex","`%s'",image->filename);
return(0);
}
return((ssize_t) index);
{
if ((index < 0) || (index >= (ssize_t) image->colors))
{
- (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError,
- "InvalidColormapIndex","`%s'",image->filename);
+ if (exception->severity != CorruptImageError)
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ CorruptImageError,"InvalidColormapIndex","`%s'",image->filename);
*target=(Quantum) 0;
}
else
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
\f
+/*
+ Define declarations.
+*/
+#define MaxExceptionList 64
+\f
/*
Forward declarations.
*/
exception->exceptions=(void *) DestroyLinkedList((LinkedListInfo *)
exception->exceptions,DestroyExceptionElement);
}
- else if (exception->exceptions != (void *) NULL)
- ClearLinkedList((LinkedListInfo *) exception->exceptions,
- DestroyExceptionElement);
+ else
+ if (exception->exceptions != (void *) NULL)
+ ClearLinkedList((LinkedListInfo *) exception->exceptions,
+ DestroyExceptionElement);
relinquish=exception->relinquish;
UnlockSemaphoreInfo(exception->semaphore);
if (relinquish != MagickFalse)
assert(exception->signature == MagickCoreSignature);
LockSemaphoreInfo(exception->semaphore);
exceptions=(LinkedListInfo *) exception->exceptions;
- if (GetNumberOfElementsInLinkedList(exceptions) > MagickMaxRecursionDepth)
+ if (GetNumberOfElementsInLinkedList(exceptions) > MaxExceptionList)
{
UnlockSemaphoreInfo(exception->semaphore);
return(MagickTrue);
exception->description=p->description;
}
UnlockSemaphoreInfo(exception->semaphore);
- if (GetNumberOfElementsInLinkedList(exceptions) == MagickMaxRecursionDepth)
+ if (GetNumberOfElementsInLinkedList(exceptions) == MaxExceptionList)
(void) ThrowMagickException(exception,GetMagickModule(),ResourceLimitError,
"TooManyExceptions","(exception processing is suspended)");
return(MagickTrue);