Commit 281b8e26 authored by jimw@mysql.com's avatar jimw@mysql.com

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

parent 8d01ea1b
......@@ -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