1
0
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:
unknown
2005-10-11 15:23:34 -07:00
parent a31b47cd9f
commit 62064da186

View File

@@ -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++)
{}