mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 20:15:29 +00:00
Workaround realpath FORTIFY crashes
This commit is contained in:
parent
a8d0936e04
commit
8ab045331b
@ -454,9 +454,12 @@ int xinotify_init1(int flags) {
|
||||
}
|
||||
|
||||
char *xrealpath(const char *path, char *resolved_path) {
|
||||
char *ret = realpath(path, resolved_path);
|
||||
char buf[PATH_MAX];
|
||||
char *ret = realpath(path, buf);
|
||||
if (ret == nullptr) {
|
||||
PLOGE("xrealpath");
|
||||
} else {
|
||||
strcpy(resolved_path, buf);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user