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 *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) {
|
if (ret == nullptr) {
|
||||||
PLOGE("xrealpath");
|
PLOGE("xrealpath");
|
||||||
|
} else {
|
||||||
|
strcpy(resolved_path, buf);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user