Fix use-after-free of stack-allocated temporary string. am: c41b838baa
am: a5efddda90
Change-Id: Ic0871bfae738d3b1854a7543843c0a9cc72c049d
This commit is contained in:
commit
dbd2ac1202
1 changed files with 3 additions and 1 deletions
|
|
@ -295,13 +295,15 @@ bool LoadSplitPolicy() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
std::string mapping_file("/system/etc/selinux/mapping/" + vend_plat_vers + ".cil");
|
std::string mapping_file("/system/etc/selinux/mapping/" + vend_plat_vers + ".cil");
|
||||||
|
const std::string version_as_string = std::to_string(max_policy_version);
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
const char* compile_args[] = {
|
const char* compile_args[] = {
|
||||||
"/system/bin/secilc",
|
"/system/bin/secilc",
|
||||||
plat_policy_cil_file,
|
plat_policy_cil_file,
|
||||||
"-M", "true", "-G", "-N",
|
"-M", "true", "-G", "-N",
|
||||||
// Target the highest policy language version supported by the kernel
|
// Target the highest policy language version supported by the kernel
|
||||||
"-c", std::to_string(max_policy_version).c_str(),
|
"-c", version_as_string.c_str(),
|
||||||
mapping_file.c_str(),
|
mapping_file.c_str(),
|
||||||
"/vendor/etc/selinux/nonplat_sepolicy.cil",
|
"/vendor/etc/selinux/nonplat_sepolicy.cil",
|
||||||
"-o", compiled_sepolicy,
|
"-o", compiled_sepolicy,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue