summaryrefslogtreecommitdiff
path: root/strings/xml.c
diff options
context:
space:
mode:
authorjimw@mysql.com <>2005-10-11 15:23:34 -0700
committerjimw@mysql.com <>2005-10-11 15:23:34 -0700
commit281b8e26d8805520e6307722e95cf2dd07c7eb3e (patch)
treea33895e5b7b576a1a5b04c026ee69c6c94430d49 /strings/xml.c
parent8d01ea1be76d87bed416778ea842175acf126834 (diff)
downloadmariadb-git-281b8e26d8805520e6307722e95cf2dd07c7eb3e.tar.gz
Fix read past allocated buffer when parsing charsets file. (Bug #6413)
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++)
{}