From: Cristy Date: Sat, 24 Jun 2017 12:29:07 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/523 X-Git-Tag: 7.0.6-1~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=be531eaab7f13ea935aaef231473044a439c9bfc;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/523 --- diff --git a/coders/dpx.c b/coders/dpx.c index cb9870dad..0d5694972 100644 --- a/coders/dpx.c +++ b/coders/dpx.c @@ -1106,6 +1106,8 @@ static Image *ReadDPXImage(const ImageInfo *image_info,ExceptionInfo *exception) StringInfo *profile; + if (dpx.file.user_size > GetBlobSize(image)) + ThrowReaderException(CorruptImageError,"ImproperImageHeader"); profile=BlobToStringInfo((const unsigned char *) NULL, dpx.file.user_size-sizeof(dpx.user.id)); if (profile == (StringInfo *) NULL)