Loading src/client/hooks.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,15 @@ int hook_statx(int dirfd, const char* path, int flags, unsigned int mask, struct ::statx* buf) { bool follow = (flags & AT_SYMLINK_NOFOLLOW) == 0; // When AT_EMPTY_PATH is set, path may legally be nullptr or "". // In that case it is an fstat-style call on an fd; forward directly to // the kernel to avoid a null-pointer dereference in fmt::format. if(path == nullptr || (flags & AT_EMPTY_PATH) != 0) { return gsl::narrow_cast<int>(syscall_no_intercept_wrapper( SYS_statx, dirfd, path, flags, mask, buf)); } LOG(DEBUG, "{}() called with dirfd: '{}', path: \"{}\", flags: '{}', mask: '{}', buf: '{}'", __func__, dirfd, path, flags, mask, fmt::ptr(buf)); Loading Loading
src/client/hooks.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,15 @@ int hook_statx(int dirfd, const char* path, int flags, unsigned int mask, struct ::statx* buf) { bool follow = (flags & AT_SYMLINK_NOFOLLOW) == 0; // When AT_EMPTY_PATH is set, path may legally be nullptr or "". // In that case it is an fstat-style call on an fd; forward directly to // the kernel to avoid a null-pointer dereference in fmt::format. if(path == nullptr || (flags & AT_EMPTY_PATH) != 0) { return gsl::narrow_cast<int>(syscall_no_intercept_wrapper( SYS_statx, dirfd, path, flags, mask, buf)); } LOG(DEBUG, "{}() called with dirfd: '{}', path: \"{}\", flags: '{}', mask: '{}', buf: '{}'", __func__, dirfd, path, flags, mask, fmt::ptr(buf)); Loading