mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-08-14 02:57:25 +00:00
Fix segfault when sepolicy.rule has empty line
This commit is contained in:
@@ -416,6 +416,7 @@ else if (strcmp(name, action) == 0) { \
|
||||
#define add_action(act, type) add_action_func(#act, type, act)
|
||||
|
||||
void sepolicy::parse_statement(rust::Str stmt) {
|
||||
if (stmt.empty()) return;
|
||||
// strtok modify strings, create a copy
|
||||
string cpy(stmt.data(), stmt.length());
|
||||
|
||||
|
Reference in New Issue
Block a user