gui: rapidxml: Bail out if detecting ABX header
The parser is supposed to parse plain XMLs, ABX format is not yet supported. Continuing to parse ABX XMLs would be spamming /tmp/recovery.log until triggering OOM. Change-Id: I5c01045d6efef0b2ac497b40d78410c2b75d30d0 (cherry picked from commit 0a352091b39cb62f919af0fbed1097194d3188bf)
This commit is contained in:
+9
-1
@@ -1390,7 +1390,15 @@ namespace rapidxml
|
||||
|
||||
// Parse BOM, if any
|
||||
parse_bom<Flags>(text);
|
||||
|
||||
|
||||
// Abort if it's ABX format
|
||||
if (text[0] == Ch('A') &&
|
||||
text[1] == Ch('B') &&
|
||||
text[2] == Ch('X')) {
|
||||
RAPIDXML_PARSE_ERROR("ABX Format Unsupported by RapidXML", text);
|
||||
return;
|
||||
}
|
||||
|
||||
// Parse children
|
||||
while (1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user