diff --git a/native/src/sepolicy/statement.cpp b/native/src/sepolicy/statement.cpp index e6553c5c2..ca282d3a5 100644 --- a/native/src/sepolicy/statement.cpp +++ b/native/src/sepolicy/statement.cpp @@ -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());