From: Cristy Date: Thu, 7 Jun 2018 22:24:26 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8766 X-Git-Tag: 7.0.7-39~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=096bddc67c4d793598263899f3a74339cefa8f92;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8766 --- diff --git a/coders/uyvy.c b/coders/uyvy.c index 73c1e0d44..2ac4d3c89 100644 --- a/coders/uyvy.c +++ b/coders/uyvy.c @@ -132,10 +132,11 @@ static Image *ReadUYVYImage(const ImageInfo *image_info, ThrowReaderException(OptionError,"MustSpecifyImageSize"); if ((image->columns % 2) != 0) image->columns++; - (void) CopyMagickString(image->filename,image_info->filename,MagickPathExtent); + (void) CopyMagickString(image->filename,image_info->filename, + MagickPathExtent); status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) - return((Image *) NULL); + return(DestroyImage(image)); if (DiscardBlobBytes(image,image->offset) == MagickFalse) ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile", image->filename);