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

Index: ImageMagick-6.8.8-1/magick/resample-private.h
===================================================================
--- ImageMagick-6.8.8-1.orig/magick/resample-private.h	2013-11-27 20:02:59.000000000 +0100
+++ ImageMagick-6.8.8-1/magick/resample-private.h	2018-03-05 18:01:13.795716078 +0100
@@ -55,13 +55,11 @@ static inline ResampleFilter **AcquireRe
   filter=(ResampleFilter **) AcquireAlignedMemory(number_threads,
     sizeof(*filter));
   if (filter == (ResampleFilter **) NULL)
-    return((ResampleFilter **) NULL);
+    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(filter,0,number_threads*sizeof(*filter));
   for (i=0; i < (ssize_t) number_threads; i++)
   {
     filter[i]=AcquireResampleFilter(image,exception);
-    if (filter[i] == (ResampleFilter *) NULL)
-      return(DestroyResampleFilterThreadSet(filter));
     if (method != UndefinedVirtualPixelMethod)
       (void) SetResampleFilterVirtualPixelMethod(filter[i],method);
     if (interpolate != MagickFalse)