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