Rework readlink to not depend on cstr nul termination

This commit is contained in:
Antonio SJ Musumeci 2026-04-24 17:35:47 -05:00
parent a86092b3c2
commit b6d5da2330
8 changed files with 44 additions and 64 deletions

View file

@ -1734,7 +1734,8 @@ fuse_debug_entry_open_out(const uint64_t unique_,
void
fuse_debug_readlink(const uint64_t unique_,
const char *linkname_)
const char *linkname_,
const size_t linkname_len_)
{
auto output = fuse_cfg.log_file();
@ -1748,8 +1749,8 @@ fuse_debug_readlink(const uint64_t unique_,
"\n",
_timestamp_ns(),
unique_,
(sizeof(struct fuse_out_header) + strlen(linkname_)),
_quoted(linkname_));
(sizeof(struct fuse_out_header) + linkname_len_),
_quoted(linkname_,linkname_len_));
}
void