summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qxmlstreamparser_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/serialization/qxmlstreamparser_p.h')
-rw-r--r--src/corelib/serialization/qxmlstreamparser_p.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/corelib/serialization/qxmlstreamparser_p.h b/src/corelib/serialization/qxmlstreamparser_p.h
index 7040cc3a48..1363bf4d41 100644
--- a/src/corelib/serialization/qxmlstreamparser_p.h
+++ b/src/corelib/serialization/qxmlstreamparser_p.h
@@ -947,7 +947,12 @@ bool QXmlStreamReaderPrivate::parse()
break;
case 262: {
- sym(1).len += fastScanName(&sym(1).prefix);
+ Value &val = sym(1);
+ if (auto res = fastScanName(&val))
+ val.len += *res;
+ else
+ return false;
+
if (atEnd) {
resume(262);
return false;
@@ -955,7 +960,11 @@ bool QXmlStreamReaderPrivate::parse()
} break;
case 263:
- sym(1).len += fastScanName();
+ if (auto res = fastScanName())
+ sym(1).len += *res;
+ else
+ return false;
+
if (atEnd) {
resume(263);
return false;