Commit f2f4649a authored by topjohnwu's avatar topjohnwu

Don't crash when encounter unexpected XML input

parent 4395ffec
......@@ -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 '="' */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment