From: Cristy Date: Mon, 3 Jun 2019 20:13:24 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-49~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d17f1778fd4e458e3c50783f8b9d77b1b982b70e;p=imagemagick ... --- 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); }