From: cristy Date: Thu, 1 Sep 2011 13:25:56 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~7108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=603952957f43862a68f3f6dbc1933bec490770e8;p=imagemagick --- diff --git a/coders/cin.c b/coders/cin.c index ed86961dc..cb3b841f3 100644 --- a/coders/cin.c +++ b/coders/cin.c @@ -671,7 +671,9 @@ static Image *ReadCINImage(const ImageInfo *image_info,ExceptionInfo *exception) /* User defined data. */ - profile=AcquireStringInfo(cin.file.user_length); + profile=BlobToStringInfo((const void *) NULL,cin.file.user_length); + if (profile == (StringInfo *) NULL) + ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); offset+=ReadBlob(image,GetStringInfoLength(profile), GetStringInfoDatum(profile)); (void) SetImageProfile(image,"dpx:user.data",profile); diff --git a/coders/dpx.c b/coders/dpx.c index 3309fee5a..7cb751ae1 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -982,7 +982,10 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) StringInfo *profile; - profile=AcquireStringInfo(dpx.file.user_size-sizeof(dpx.user.id)); + profile=BlobToStringInfo((const void *) NULL, + dpx.file.user_size-sizeof(dpx.user.id)); + if (profile == (StringInfo *) NULL) + ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); offset+=ReadBlob(image,GetStringInfoLength(profile), GetStringInfoDatum(profile)); (void) SetImageProfile(image,"dpx",profile);