Fix an UB when cil compile error

This commit is contained in:
LoveSy
2022-01-06 13:25:21 +08:00
committed by John Wu
parent 66cf2c984a
commit b2cd24ed1b
2 changed files with 20 additions and 1 deletions

View File

@ -100,6 +100,11 @@ bool MagiskInit::patch_sepolicy(const char *file) {
if (patch_init)
sepol = sepolicy::from_split();
if (!sepol) {
LOGE("Cannot load split cil\n");
return false;
}
sepol->magisk_rules();
// Custom rules