Commit b348fac0c for imagemagick.org

commit b348fac0c496f0e8e5c2112a62c0a4cdeb46f5a4
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Sun Apr 26 12:34:55 2026 -0400

    https://github.com/ImageMagick/ImageMagick/issues/8690

diff --git a/coders/svg.c b/coders/svg.c
index f6ae7970d..732f9a14e 100644
--- a/coders/svg.c
+++ b/coders/svg.c
@@ -862,9 +862,15 @@ static char **SVGKeyValuePairs(SVGInfo *svg_info,const int key_sentinel,
     tokens[i]=(char *) AcquireMagickMemory((size_t) (q-p+2));
     if (tokens[i] == (char *) NULL)
       {
+        ssize_t
+          j;
+
         (void) ThrowMagickException(svg_info->exception,GetMagickModule(),
           ResourceLimitError,"MemoryAllocationFailed","`%s'",text);
-        break;
+        for (j=0; j < i; j++)
+          tokens[j]=DestroyString(tokens[j]);
+        tokens=(char **) RelinquishMagickMemory(tokens);
+        return(tokens);
       }
     (void) CopyMagickString(tokens[i],p,(size_t) (q-p+1));
     SVGStripString(MagickTrue,tokens[i]);
diff --git a/tests/wandtest.c b/tests/wandtest.c
index e59f66b40..bf9f11221 100644
--- a/tests/wandtest.c
+++ b/tests/wandtest.c
@@ -5232,7 +5232,7 @@ int main(int argc,char **argv)
         if (path[strlen(path)-1] != '/')
           (void) ConcatenateMagickString(path,"/",MagickPathExtent);
       }
-    (void) strcat(path,"sequence.miff");
+    (void) ConcatenateMagickString(path,"sequence.miff",MagickPathExtent);
     status=MagickReadImage(magick_wand,path);
   }
   if (status == MagickFalse)