mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 12:05:30 +00:00
Don't crash when encounter unexpected XML input
This commit is contained in:
parent
4395ffec5f
commit
f2f4649ab0
@ -106,6 +106,8 @@ static bool parse_packages_xml(string_view s) {
|
||||
string_view pkg;
|
||||
for (char *tok = start; *tok;) {
|
||||
char *eql = strchr(tok, '=');
|
||||
if (eql == nullptr)
|
||||
break;
|
||||
*eql = '\0'; /* Terminate '=' */
|
||||
string_view key(tok, eql - tok);
|
||||
eql += 2; /* Skip '="' */
|
||||
|
Loading…
Reference in New Issue
Block a user