StringInfo
*profile;
- if ((MagickSizeType) StringToLong(options) > GetBlobSize(image))
+ length=(size_t) StringToLong(options);
+ if ((MagickSizeType) length > GetBlobSize(image))
{
options=DestroyString(options);
ThrowReaderException(CorruptImageError,
profiles=NewLinkedList(0);
(void) AppendValueToLinkedList(profiles,
AcquireString(keyword+8));
- length=(size_t) StringToLong(options);
- if (length > sizeof(keyword)-8)
- {
- options=DestroyString(options);
- profiles=DestroyLinkedList(profiles,
- RelinquishMagickMemory);
- ThrowReaderException(CorruptImageError,
- "ImproperImageHeader");
- }
profile=BlobToStringInfo((const void *) NULL,length);
if (profile == (StringInfo *) NULL)
{
if ((LocaleNCompare(keyword,"profile:",8) == 0) ||
(LocaleNCompare(keyword,"profile-",8) == 0))
{
+ size_t
+ length;
+
StringInfo
*profile;
- if ((MagickSizeType) StringToLong(options) > GetBlobSize(image))
+ length=StringToLong(options);
+ if ((MagickSizeType) length > GetBlobSize(image))
{
options=DestroyString(options);
ThrowReaderException(CorruptImageError,