Commit 8ab04533 authored by topjohnwu's avatar topjohnwu

Workaround realpath FORTIFY crashes

parent a8d0936e
......@@ -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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment