mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-11 06:32:19 +00:00
Update dtb patch to not use in-place modification
This commit is contained in:
@@ -46,7 +46,9 @@ void magisk_cpio::patch(bool keepverity, bool keepforceencrypt) {
|
||||
str_contains(cur->first, "fstab") && S_ISREG(cur->second->mode);
|
||||
if (!keepverity) {
|
||||
if (fstab) {
|
||||
patch_verity(&cur->second->data, &cur->second->filesize);
|
||||
auto buf = patch_verity(cur->second->data, cur->second->filesize);
|
||||
free(cur->second->data);
|
||||
cur->second->data = buf;
|
||||
} else if (cur->first == "verity_key") {
|
||||
rm(cur);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user