You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
add: error handling for UpdateMountNamespace
This commit adds the missing error handling for "UpdateMountNamespace" in both libzygisk.so and ReZygiskd, as before it would send a -1 as unsigned, leading to issues.
This commit is contained in:
@@ -342,6 +342,14 @@ bool rezygiskd_update_mns(enum mount_namespace_state nms_state, char *buf, size_
|
||||
return false;
|
||||
}
|
||||
|
||||
if (target_fd == 0) {
|
||||
LOGE("Failed to get target fd");
|
||||
|
||||
close(fd);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
snprintf(buf, buf_size, "/proc/%u/fd/%u", target_pid, target_fd);
|
||||
|
||||
close(fd);
|
||||
|
||||
Reference in New Issue
Block a user