Fix read past allocated buffer when parsing charsets file. (Bug #6413)
This commit is contained in:
parent
8d01ea1be7
commit
281b8e26d8
@ -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++)
|
||||
{}
|
||||
|
Loading…
x
Reference in New Issue
Block a user