Skip to content
Permalink
Browse files Browse the repository at this point in the history
Added missing return to avoid use after free.
  • Loading branch information
dlemstra committed Nov 18, 2017
1 parent 422bbf5 commit dd96d67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Magick++/lib/Image.cpp
Expand Up @@ -5140,9 +5140,14 @@ void Magick::Image::read(MagickCore::Image *image,
image == (MagickCore::Image *) NULL)
{
(void) MagickCore::DestroyExceptionInfo(exceptionInfo);
throwExceptionExplicit(ImageWarning,"No image was loaded.");
if (!quiet())
throwExceptionExplicit(MagickCore::ImageWarning,
"No image was loaded.");
}
else
{
ThrowImageException;
}
ThrowImageException;
if (image != (MagickCore::Image *) NULL)
throwException(&image->exception,quiet());
}
Expand Down

0 comments on commit dd96d67

Please sign in to comment.