mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix read past allocated buffer when parsing charsets file. (Bug #6413)
strings/xml.c: Don't look for comment past end of buffer.
This commit is contained in:
@@ -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++)
|
||||
{}
|
||||
|
Reference in New Issue
Block a user