diff options
author | unknown <jimw@mysql.com> | 2005-10-11 15:23:34 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-10-11 15:23:34 -0700 |
commit | 62064da186e20624751eb8d67255b7629c6a4398 (patch) | |
tree | a33895e5b7b576a1a5b04c026ee69c6c94430d49 /strings/xml.c | |
parent | a31b47cd9fe191d3227533bb98ade432a9bb1052 (diff) | |
download | mariadb-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.c | 2 |
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++) {} |