Commit d37c2aed authored by unknown's avatar unknown

Fix read past allocated buffer when parsing charsets file. (Bug #6413)


strings/xml.c:
  Don't look for comment past end of buffer.
parent b8bade6b
......@@ -81,7 +81,7 @@ static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
a->beg=p->cur;
a->end=p->cur;
if (!bcmp(p->cur,"<!--",4))
if ((p->end - p->cur > 3) && !bcmp(p->cur,"<!--",4))
{
for( ; (p->cur < p->end) && bcmp(p->cur, "-->", 3); p->cur++)
{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment