summaryrefslogtreecommitdiff
path: root/strings/xml.c
diff options
context:
space:
mode:
authorMikael Ronstrom <mikael@dator8>2011-03-04 12:35:24 +0100
committerMikael Ronstrom <mikael@dator8>2011-03-04 12:35:24 +0100
commit0fc7078e53eb2b34503ddd2408844c2fa06d393f (patch)
treebccbd7ab21bb499f9f924e6f90e9303f3018d1ae /strings/xml.c
parent23296fdc18e864b1b016b4c6a47723b26480f9c6 (diff)
parenta4711099716c53490a69c3c17a8b61a4a3282b19 (diff)
downloadmariadb-git-0fc7078e53eb2b34503ddd2408844c2fa06d393f.tar.gz
merge
Diffstat (limited to 'strings/xml.c')
-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);