summaryrefslogtreecommitdiff
path: root/strings
diff options
context:
space:
mode:
authorAlexander Barkov <alexander.barkov@oracle.com>2011-03-01 17:42:37 +0300
committerAlexander Barkov <alexander.barkov@oracle.com>2011-03-01 17:42:37 +0300
commit561738dc10c6d64837bba6816efdeb69d4641e56 (patch)
tree479b57d94138f8f0034f1c2dfaa044424e7a68e0 /strings
parenta4481d32220ad283c50e9a95e56b9bafe13b592c (diff)
parentfd1e3b03ff8837e8af1a8aa486cc2b13f872861f (diff)
downloadmariadb-git-561738dc10c6d64837bba6816efdeb69d4641e56.tar.gz
Merging from mysql-5.1
Diffstat (limited to 'strings')
-rw-r--r--strings/xml.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/strings/xml.c b/strings/xml.c
index 29ce74e36a0..abe40810a97 100644
--- a/strings/xml.c
+++ b/strings/xml.c
@@ -165,11 +165,16 @@ static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
}
else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') )
{
+ /*
+ "string" or 'string' found.
+ Scan until the closing quote/doublequote, or until the END-OF-INPUT.
+ */
p->cur++;
for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++)
{}
a->end=p->cur;
- if (a->beg[0] == p->cur[0])p->cur++;
+ if (p->cur < p->end) /* Closing quote or doublequote has been found */
+ p->cur++;
a->beg++;
if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION))
my_xml_norm_text(a);