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

Index: ImageMagick-6.8.8-1/magick/opencl.c
===================================================================
--- ImageMagick-6.8.8-1.orig/magick/opencl.c	2018-03-14 15:49:04.127875660 +0100
+++ ImageMagick-6.8.8-1/magick/opencl.c	2018-03-14 15:56:22.999379559 +0100
@@ -544,6 +544,8 @@ static MagickBooleanType saveBinaryCLPro
   }
 
   binaryProgram = (unsigned char*) AcquireMagickMemory(binaryProgramSize);
+  if (binaryProgram == NULL)
+    goto cleanup;
   clStatus = clGetProgramInfo(clEnv->programs[prog], CL_PROGRAM_BINARIES, sizeof(char*), &binaryProgram, NULL);
   if (clStatus != CL_SUCCESS)
   {