diff options
Diffstat (limited to 'strings')
-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++) {} |