Check to ensure token does not exceed maximum extent
diff --git a/MagickCore/configure.c b/MagickCore/configure.c
index 768bc39..0962035 100644
--- a/MagickCore/configure.c
+++ b/MagickCore/configure.c
@@ -895,7 +895,7 @@
/*
Search $XDG_CONFIG_HOME/ImageMagick.
*/
- (void) FormatLocaleString(path,MaxTextExtent,"%s%sImageMagick%s",
+ (void) FormatLocaleString(path,MagickPathExtent,"%s%sImageMagick%s",
home,DirectorySeparator,DirectorySeparator);
(void) AppendValueToLinkedList(paths,ConstantString(path));
home=DestroyString(home);
@@ -1165,7 +1165,7 @@
/*
Interpret XML.
*/
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -1175,7 +1175,7 @@
Doctype element.
*/
while ((LocaleNCompare(q,"]>",2) != 0) && (*q != '\0'))
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
continue;
}
if (LocaleNCompare(keyword,"<!--",4) == 0)
@@ -1184,7 +1184,7 @@
Comment element.
*/
while ((LocaleNCompare(q,"->",2) != 0) && (*q != '\0'))
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
continue;
}
if (LocaleCompare(keyword,"<include") == 0)
@@ -1195,10 +1195,10 @@
while (((*token != '/') && (*(token+1) != '>')) && (*q != '\0'))
{
(void) CopyMagickString(keyword,token,MagickPathExtent);
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
if (*token != '=')
continue;
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
if (LocaleCompare(keyword,"file") == 0)
{
if (depth > 200)
@@ -1260,11 +1260,11 @@
/*
Parse configure element.
*/
- GetMagickToken(q,(const char **) NULL,token);
+ GetMagickToken(q,(const char **) NULL,MagickPathExtent,token);
if (*token != '=')
continue;
- GetMagickToken(q,&q,token);
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
switch (*keyword)
{
case 'N':