Commit a3b8df6ab for imagemagick.org

commit a3b8df6ab0ca77c1bd9da26ec2514b6a8175c51f
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Mon Oct 5 21:26:47 2026 +0200

    Stop configuration parsing when an included file fails.

diff --git a/MagickCore/color.c b/MagickCore/color.c
index 0bc8c9836..3d972ceeb 100644
--- a/MagickCore/color.c
+++ b/MagickCore/color.c
@@ -2086,10 +2086,14 @@ static MagickBooleanType LoadColorCache(LinkedListInfo *cache,const char *xml,
                       if (LoadColorCache(cache,file_xml,path,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=DestroyString(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<color") == 0)
diff --git a/MagickCore/configure.c b/MagickCore/configure.c
index ea7675e5b..5ea79f169 100644
--- a/MagickCore/configure.c
+++ b/MagickCore/configure.c
@@ -1251,10 +1251,14 @@ static MagickBooleanType LoadConfigureCache(LinkedListInfo *cache,
                       if (LoadConfigureCache(cache,file_xml,path,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=DestroyString(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<configure") == 0)
diff --git a/MagickCore/delegate.c b/MagickCore/delegate.c
index deba86dd8..0637b7a59 100644
--- a/MagickCore/delegate.c
+++ b/MagickCore/delegate.c
@@ -2201,10 +2201,14 @@ static MagickBooleanType LoadDelegateCache(LinkedListInfo *cache,
                       if (LoadDelegateCache(cache,file_xml,path,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=DestroyString(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<delegate") == 0)
diff --git a/MagickCore/locale.c b/MagickCore/locale.c
index 77c445e48..563248b49 100644
--- a/MagickCore/locale.c
+++ b/MagickCore/locale.c
@@ -1282,10 +1282,14 @@ static MagickBooleanType LoadLocaleCache(SplayTreeInfo *cache,const char *xml,
                       if (LoadLocaleCache(cache,file_xml,path,locale,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=DestroyString(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<locale") == 0)
diff --git a/MagickCore/log.c b/MagickCore/log.c
index c409f9e77..e2034fcd4 100644
--- a/MagickCore/log.c
+++ b/MagickCore/log.c
@@ -1004,10 +1004,14 @@ static MagickBooleanType LoadLogCache(LinkedListInfo *cache,const char *xml,
                       if (LoadLogCache(cache,file_xml,path,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=DestroyString(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<logmap>") == 0)
diff --git a/MagickCore/policy.c b/MagickCore/policy.c
index 5bcb08511..07b0a56e5 100644
--- a/MagickCore/policy.c
+++ b/MagickCore/policy.c
@@ -1198,10 +1198,14 @@ static MagickBooleanType LoadPolicyCache(LinkedListInfo *cache,
                       if (LoadPolicyCache(cache,file_xml,path,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=DestroyString(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<policy") == 0)
diff --git a/MagickCore/type.c b/MagickCore/type.c
index 08aea4b0d..06f57347e 100644
--- a/MagickCore/type.c
+++ b/MagickCore/type.c
@@ -1183,10 +1183,14 @@ static MagickBooleanType LoadTypeCache(SplayTreeInfo *cache,const char *xml,
                       if (LoadTypeCache(cache,file_xml,path,depth+1,exception) == MagickFalse)
                         status=MagickFalse;
                       file_xml=(char *) RelinquishMagickMemory(file_xml);
+                      if (status == MagickFalse)
+                        break;
                     }
                 }
             }
         }
+        if (status == MagickFalse)
+          break;
         continue;
       }
     if (LocaleCompare(keyword,"<type") == 0)