Move part of libbase to Rust

This commit is contained in:
topjohnwu
2022-08-08 22:53:37 -07:00
parent dd565a11ea
commit 4c0f72f68f
19 changed files with 205 additions and 130 deletions

View File

@@ -221,7 +221,7 @@ void magisk_cpio::backup(const char *orig) {
if (!rm_list.empty()) {
auto rm_list_file = new cpio_entry(S_IFREG);
rm_list_file->filesize = rm_list.length();
rm_list_file->data = xmalloc(rm_list.length());
rm_list_file->data = malloc(rm_list.length());
memcpy(rm_list_file->data, rm_list.data(), rm_list.length());
backups.emplace(".backup/.rmlist", rm_list_file);
}