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