summaryrefslogtreecommitdiffstats
path: root/gui/rapidxml.hpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@yahoo.com>2013-04-05 19:02:14 +0200
committerDees_Troy <dees_troy@yahoo.com>2013-04-05 19:04:38 +0200
commit34614eb94f33af6e0b5bbba6f9305645969269aa (patch)
treeb0c40c3909013f460813ddb05ae763890a858201 /gui/rapidxml.hpp
parentFix handling of subpartitions (diff)
downloadandroid_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.gz
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.bz2
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.lz
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.xz
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.tar.zst
android_bootable_recovery-34614eb94f33af6e0b5bbba6f9305645969269aa.zip
Diffstat (limited to '')
-rw-r--r--gui/rapidxml.hpp36
1 files changed, 27 insertions, 9 deletions
diff --git a/gui/rapidxml.hpp b/gui/rapidxml.hpp
index d98173ecd..c0a7be44e 100644
--- a/gui/rapidxml.hpp
+++ b/gui/rapidxml.hpp
@@ -1745,8 +1745,10 @@ namespace rapidxml
// Skip until end of declaration
while (text[0] != Ch('?') || text[1] != Ch('>'))
{
- if (!text[0])
+ if (!text[0]) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
text += 2; // Skip '?>'
@@ -1780,8 +1782,10 @@ namespace rapidxml
// Skip until end of comment
while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>'))
{
- if (!text[0])
+ if (!text[0]) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
text += 3; // Skip '-->'
@@ -1794,8 +1798,10 @@ namespace rapidxml
// Skip until end of comment
while (text[0] != Ch('-') || text[1] != Ch('-') || text[2] != Ch('>'))
{
- if (!text[0])
+ if (!text[0]) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
@@ -1837,7 +1843,7 @@ namespace rapidxml
{
case Ch('['): ++depth; break;
case Ch(']'): --depth; break;
- case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ case 0: RAPIDXML_PARSE_ERROR("unexpected end of data", text); return 0;
}
++text;
}
@@ -1847,6 +1853,7 @@ namespace rapidxml
// Error on end of text
case Ch('\0'):
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
// Other character, skip it
default:
@@ -1903,8 +1910,10 @@ namespace rapidxml
// Skip to '?>'
while (text[0] != Ch('?') || text[1] != Ch('>'))
{
- if (*text == Ch('\0'))
+ if (*text == Ch('\0')) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
@@ -1926,8 +1935,10 @@ namespace rapidxml
// Skip to '?>'
while (text[0] != Ch('?') || text[1] != Ch('>'))
{
- if (*text == Ch('\0'))
+ if (*text == Ch('\0')) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
text += 2; // Skip '?>'
@@ -2005,8 +2016,10 @@ namespace rapidxml
// Skip until end of cdata
while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>'))
{
- if (!text[0])
+ if (!text[0]) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
text += 3; // Skip ]]>
@@ -2017,8 +2030,10 @@ namespace rapidxml
Ch *value = text;
while (text[0] != Ch(']') || text[1] != Ch(']') || text[2] != Ch('>'))
{
- if (!text[0])
+ if (!text[0]) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
@@ -2154,8 +2169,10 @@ namespace rapidxml
++text; // Skip !
while (*text != Ch('>'))
{
- if (*text == 0)
+ if (*text == 0) {
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return 0;
+ }
++text;
}
++text; // Skip '>'
@@ -2224,6 +2241,7 @@ namespace rapidxml
// End of data - error
case Ch('\0'):
RAPIDXML_PARSE_ERROR("unexpected end of data", text);
+ return;
// Data node
default: