From d17f1778fd4e458e3c50783f8b9d77b1b982b70e Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 3 Jun 2019 16:13:24 -0400 Subject: [PATCH] ... --- MagickCore/client.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/MagickCore/client.c b/MagickCore/client.c index e09c5dc56..42d01246d 100644 --- a/MagickCore/client.c +++ b/MagickCore/client.c @@ -41,6 +41,7 @@ */ #include "MagickCore/studio.h" #include "MagickCore/client.h" +#include "MagickCore/log.h" #include "MagickCore/string_.h" /* @@ -114,11 +115,14 @@ MagickExport const char *GetClientPath(void) MagickExport const char *SetClientName(const char *name) { static char - client_name[MagickPathExtent] = "Magick"; + client_name[256] = ""; if ((name != (char *) NULL) && (*name != '\0')) - (void) CopyMagickString(client_name,name,MagickPathExtent); - return(client_name); + { + (void) CopyMagickString(client_name,name,sizeof(client_name)); + (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),"%s",client_name); + } + return(*client_name == '\0' ? "Magick" : client_name); } /* @@ -151,6 +155,9 @@ MagickExport const char *SetClientPath(const char *path) client_path[MagickPathExtent] = ""; if ((path != (char *) NULL) && (*path != '\0')) - (void) CopyMagickString(client_path,path,MagickPathExtent); + { + (void) CopyMagickString(client_path,path,MagickPathExtent); + (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),"%s",path); + } return(client_path); } -- 2.40.0