From: Cristy Date: Sat, 30 Sep 2017 13:56:36 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/798 X-Git-Tag: 7.0.7-5~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9f95e186df8190d8539ca5d41e0e252c980724ec;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/798 --- diff --git a/MagickCore/opencl.c b/MagickCore/opencl.c index 9bd262902..b913d6679 100644 --- a/MagickCore/opencl.c +++ b/MagickCore/opencl.c @@ -2333,7 +2333,7 @@ static void LoadOpenCLDevices(MagickCLEnv clEnv) openCL_library->clGetDeviceInfo(devices[j],CL_DRIVER_VERSION,0,NULL, &length); - device->version=AcquireQuantumMemory(length,sizeof(*device->version)); + device->version=AcquireCriticalMemory(length*sizeof(*device->version)); openCL_library->clGetDeviceInfo(devices[j],CL_DRIVER_VERSION,length, device->version,NULL); diff --git a/MagickCore/segment.c b/MagickCore/segment.c index 7bb25dba3..e47d0cd4b 100644 --- a/MagickCore/segment.c +++ b/MagickCore/segment.c @@ -1364,7 +1364,7 @@ static IntervalTree *InitializeIntervalTree(const ZeroCrossing *zero_crossing, /* The root is the entire histogram. */ - root=(IntervalTree *) AcquireMagickMemory(sizeof(*root)); + root=(IntervalTree *) AcquireCriticalMemory(sizeof(*root)); root->child=(IntervalTree *) NULL; root->sibling=(IntervalTree *) NULL; root->tau=0.0;