Commit 12cd24e8e for imagemagick.org

commit 12cd24e8e5d048334b6e438d11f11725e11997ec
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Wed Dec 2 13:28:22 2026 -0500

    https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-j3xx-gx3g-j8qh

diff --git a/Magick++/lib/Drawable.cpp b/Magick++/lib/Drawable.cpp
index be400dc40..f9d57042e 100644
--- a/Magick++/lib/Drawable.cpp
+++ b/Magick++/lib/Drawable.cpp
@@ -1201,6 +1201,10 @@ void Magick::DrawableStrokeDashArray::dasharray(const double* dasharray_)
   new_dasharray=(double *) NULL;
   n=0;

+  // Self-assignment of the current buffer is a no-op.
+  if ((dasharray_ != (const double *) NULL) && (dasharray_ == _dasharray))
+    return;
+
   if (dasharray_ != (const double *) NULL)
     {
       // Count elements in dash array
diff --git a/Magick++/lib/Magick++/Drawable.h b/Magick++/lib/Magick++/Drawable.h
index 4277c2578..86baef90a 100644
--- a/Magick++/lib/Magick++/Drawable.h
+++ b/Magick++/lib/Magick++/Drawable.h
@@ -1722,6 +1722,13 @@ private:
   // dasharray_ is an allocated array terminated by value 0.0 or 0.
   // The array is copied so the original does not need to be preserved.
   // Pass a null pointer to clear an existing dash array setting.
+  //
+  // Lifetime note: the pointer returned by dasharray() refers to storage
+  // owned by this object. It remains valid only until this object is
+  // destroyed, assigned to, or its dasharray(const double*) setter is called.
+  // Do not retain it beyond that point. Passing the returned pointer back to
+  // the setter of the same object is safe because the setter copies before
+  // releasing the old array.
   class MagickPPExport DrawableStrokeDashArray : public DrawableBase
   {
   public:
@@ -1738,7 +1745,13 @@ private:
       // Return polymorphic copy of object
       DrawableBase* copy() const;

+      // Copies dasharray_ (terminated by 0.0) into internal storage.
+      // dasharray_ may alias this object's own array, but must not be a
+      // dangling pointer from a destroyed or reassigned object.
       void dasharray(const double* dasharray_);
+
+      // Returns a pointer to internal storage (see lifetime note above).
+      // The caller must not modify or free it.
       const double* dasharray(void) const;

       DrawableStrokeDashArray& operator=(