Use rust::String::c_str to ensure nil termination

This commit is contained in:
topjohnwu
2025-05-09 16:02:39 -07:00
parent e3e4202954
commit 9684a35cab
2 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -98,9 +98,9 @@ pub mod ffi {
fn patch_ro_root(self: &mut MagiskInit);
// Used in C++
unsafe fn setup_tmp(self: &MagiskInit, path: *const c_char);
unsafe fn setup_tmp(self: &mut MagiskInit, path: *const c_char);
fn collect_devices(self: &MagiskInit);
fn mount_preinit_dir(self: &MagiskInit);
fn mount_preinit_dir(self: &mut MagiskInit);
unsafe fn find_block(self: &MagiskInit, partname: *const c_char) -> u64;
unsafe fn patch_fissiond(self: &mut MagiskInit, tmp_path: *const c_char);
}