]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Sun, 1 Oct 2017 00:19:39 +0000 (20:19 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 1 Oct 2017 00:19:39 +0000 (20:19 -0400)
Magick++/lib/Options.cpp

index 447d78da65ed8993a8482d0afe541a6f69a5b0a6..b0b3f21526666bc0fb6d9ab62617d749815517e6 100644 (file)
@@ -587,6 +587,9 @@ void Magick::Options::strokeDashArray(const double *strokeDashArray_)
       // Allocate elements
       _drawInfo->dash_pattern=static_cast<double*>(AcquireMagickMemory((x+1)*
         sizeof(double)));
+      if (!_drawInfo->dash_pattern)
+        throwExceptionExplicit(MagickCore::ResourceLimitError,
+          "Unable to allocate dash-pattern memory");
       // Copy elements
       memcpy(_drawInfo->dash_pattern,strokeDashArray_,(x+1)*sizeof(double));
       _drawInfo->dash_pattern[x]=0.0;