From 2ae30a5e710eebbfbb2573202e6c193dd75d212d Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sun, 13 Jan 2019 12:42:45 +0100 Subject: [PATCH] Only load the first configure.xml file that was found to avoid duplicate values. --- MagickCore/configure.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/MagickCore/configure.c b/MagickCore/configure.c index 04594ed9e..41c08a7de 100644 --- a/MagickCore/configure.c +++ b/MagickCore/configure.c @@ -145,18 +145,9 @@ static LinkedListInfo *AcquireConfigureCache(const char *filename, head_path[MagickPathExtent], path[MagickPathExtent]; - ConfigureInfo - *configure_info; - LinkedListInfo *cache; - MagickBooleanType - status; - - register ssize_t - i; - /* Load external configure map. */ @@ -169,12 +160,17 @@ static LinkedListInfo *AcquireConfigureCache(const char *filename, LinkedListInfo *options; + MagickBooleanType + status; + options=GetConfigureOptions(filename,exception); option=(const StringInfo *) GetNextValueInLinkedList(options); while (option != (const StringInfo *) NULL) { - (void) LoadConfigureCache(cache,(const char *) + status=LoadConfigureCache(cache,(const char *) GetStringInfoDatum(option),GetStringInfoPath(option),0,exception); + if (status == MagickTrue) + break; option=(const StringInfo *) GetNextValueInLinkedList(options); } options=DestroyConfigureOptions(options); -- 2.40.0