File ImageMagick-CVE-2017-1000445.patch of Package ImageMagick.openSUSE_Leap_42.3_Update

diff --git a/magick/random-private.h b/magick/random-private.h
index 0a169480b5..868defbe69 100644
--- a/magick/random-private.h
+++ b/magick/random-private.h
@@ -52,14 +52,10 @@ static inline RandomInfo **AcquireRandomInfoThreadSet(void)
   random_info=(RandomInfo **) AcquireAlignedMemory(number_threads,
     sizeof(*random_info));
   if (random_info == (RandomInfo **) NULL)
-    return((RandomInfo **) NULL);
+    ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
   (void) ResetMagickMemory(random_info,0,number_threads*sizeof(*random_info));
   for (i=0; i < (ssize_t) number_threads; i++)
-  {
     random_info[i]=AcquireRandomInfo();
-    if (random_info[i] == (RandomInfo *) NULL)
-      return(DestroyRandomInfoThreadSet(random_info));
-  }
   return(random_info);
 }
 

openSUSE Build Service is sponsored by