length=GetImageListLength(image);
if (AcquireMagickResource(ListLengthResource,length) == MagickFalse)
{
- (void) ThrowMagickException(exception,GetMagickModule(),ImageError,
- "ListLengthExceedsLimit","`%s'",image->filename);
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ ResourceLimitError,"ListLengthExceedsLimit","`%s'",image->filename);
return((Cache) NULL);
}
LockSemaphoreInfo(image->semaphore);
#include "MagickCore/property.h"
#include "MagickCore/quantize.h"
#include "MagickCore/quantum-private.h"
+#include "MagickCore/resource_.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
break;
}
} while (foundAllLayers == MagickFalse);
+ if (AcquireMagickResource(ListLengthResource,number_layers) == MagickFalse)
+ ThrowReaderException(ResourceLimitError,"ListLengthExceedsLimit");
doc_info.number_layers=number_layers;
offset=SeekBlob(image,oldPos,SEEK_SET); /* restore the position! */
if (offset < 0)
<message name="LeftAndRightImageSizesDiffer">
left and right image sizes differ
</message>
- <message name="ListLengthExceedsLimit">
- list length exceeds limit
- </message>
<message name="NegativeOrZeroImageSize">
negative or zero image size
</message>
<resource>
<limit>
<error>
- <message name="PixelCacheAllocationFailed">
- pixel cache allocation failed
+ <message name="ListLengthExceedsLimit">
+ list length exceeds limit
</message>
<message name="MemoryAllocationFailed">
memory allocation failed
</message>
+ <message name="PixelCacheAllocationFailed">
+ pixel cache allocation failed
+ </message>
<message name="TooManyObjects">
too many objects
</message>
<message name="LeftAndRightImageSizesDiffer">
différences dans les tailles des images gauche et droite
</message>
- <message name="ListLengthExceedsLimit">
- list length exceeds limit
- </message>
<message name="NegativeOrZeroImageSize">
Taille d'image négative ou nulle
</message>
<resource>
<limit>
<error>
- <message name="PixelCacheAllocationFailed">
- Échec allocation du cache pixel
+ <message name="ListLengthExceedsLimit">
+ list length exceeds limit
</message>
<message name="MemoryAllocationFailed">
Échec allocation mémoire
</message>
+ <message name="PixelCacheAllocationFailed">
+ Échec allocation du cache pixel
+ </message>
<message name="TooManyObjects">
too many objects
</message>