Skip to content

Commit

Permalink
Added check for bogus num_images value.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Dec 29, 2014
1 parent 3816c49 commit 504ada8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions coders/dds.c
Expand Up @@ -1836,6 +1836,8 @@ static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
if (n != 0)
{
if (EOFBlob(image) != MagickFalse)
ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile");
/* Start a new image */
AcquireNextImage(image_info,image);
if (GetNextImageInList(image) == (Image *) NULL)
Expand Down

0 comments on commit 504ada8

Please sign in to comment.