]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6068
authorCristy <urban-warrior@imagemagick.org>
Wed, 7 Feb 2018 21:04:57 +0000 (16:04 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 7 Feb 2018 21:04:57 +0000 (16:04 -0500)
coders/miff.c
coders/mpc.c

index d42d5340c3fa025b43892e569ea83793b45e860a..f79216ab9c12e930037dd6829cd8b06b93b60c29 100644 (file)
@@ -913,6 +913,9 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
                     length=(size_t) StringToLong(options);
                     if ((MagickSizeType) length > GetBlobSize(image))
                       {
+                        if (profiles != (LinkedListInfo *) NULL)
+                          profiles=DestroyLinkedList(profiles,
+                            RelinquishMagickMemory);
                         options=DestroyString(options);
                         ThrowReaderException(CorruptImageError,
                           "InsufficientImageDataInFile");
index 35f75ea683ba4cbe95ed935a00f1d757671f6176..fe6506bec8cc8129529c6b72eb16a7369250595e 100644 (file)
@@ -634,6 +634,9 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                     length=StringToLong(options);
                     if ((MagickSizeType) length > GetBlobSize(image))
                       {
+                        if (profiles != (LinkedListInfo *) NULL)
+                          profiles=DestroyLinkedList(profiles,
+                            RelinquishMagickMemory);
                         options=DestroyString(options);
                         ThrowReaderException(CorruptImageError,
                           "InsufficientImageDataInFile");