summaryrefslogtreecommitdiff
path: root/strings/xml.c
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-10-11 15:23:34 -0700
committerunknown <jimw@mysql.com>2005-10-11 15:23:34 -0700
commit62064da186e20624751eb8d67255b7629c6a4398 (patch)
treea33895e5b7b576a1a5b04c026ee69c6c94430d49 /strings/xml.c
parenta31b47cd9fe191d3227533bb98ade432a9bb1052 (diff)
downloadmariadb-git-62064da186e20624751eb8d67255b7629c6a4398.tar.gz
Fix read past allocated buffer when parsing charsets file. (Bug #6413)
strings/xml.c: Don't look for comment past end of buffer.
Diffstat (limited to 'strings/xml.c')
-rw-r--r--strings/xml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strings/xml.c b/strings/xml.c
index 6ba52ea41a8..cec15b99f10 100644
--- a/strings/xml.c
+++ b/strings/xml.c
@@ -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++)
{}