File ImageMagick-CVE-2017-8830.patch of Package ImageMagick.8212

diff --git a/coders/bmp.c b/coders/bmp.c
index d58ba76..bf9a0f7 100644
--- a/coders/bmp.c
+++ b/coders/bmp.c
@@ -1390,7 +1390,7 @@ static Image *ReadBMPImage(const ImageInfo *image_info,ExceptionInfo *exception)
         if (flipped_image != (Image *) NULL)
           {
             DuplicateBlob(flipped_image,image);
-            image=DestroyImage(image);
+            ReplaceImageInList(&image, flipped_image);
             image=flipped_image;
           }
       }