Check to ensure token does not exceed maximum extent
diff --git a/MagickCore/coder.c b/MagickCore/coder.c
index 1231ba0..88f2bbf 100644
--- a/MagickCore/coder.c
+++ b/MagickCore/coder.c
@@ -834,7 +834,7 @@
/*
Interpret XML.
*/
- GetMagickToken(q,&q,token);
+ GetMagickToken(q,&q,MagickPathExtent,token);
if (*token == '\0')
break;
(void) CopyMagickString(keyword,token,MagickPathExtent);
@@ -844,7 +844,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)
@@ -853,7 +853,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)
@@ -864,10 +864,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)
@@ -926,11 +926,11 @@
coder_info=(CoderInfo *) NULL;
continue;
}
- 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 'M':