mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-04-18 22:51:27 +00:00
Fix segmentation fault
When both keepverity and keepforceencrypt are false, ‘e’ will be freed after removing ‘verity_key’ and segmentation fault might happened in strstr(e->filename, “fstab”) Signed-off-by: Shaka Huang <shakalaca@gmail.com>
This commit is contained in:
parent
2bf2e7461f
commit
482c9af41f
@ -21,6 +21,7 @@ static void cpio_patch(struct vector *v, int keepverity, int keepforceencrypt) {
|
|||||||
fprintf(stderr, "Remove [verity_key]\n");
|
fprintf(stderr, "Remove [verity_key]\n");
|
||||||
cpio_free(e);
|
cpio_free(e);
|
||||||
vec_cur(v) = NULL;
|
vec_cur(v) = NULL;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!keepforceencrypt) {
|
if (!keepforceencrypt) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user