diff options
Diffstat (limited to 'fs-tracer-common')
| -rw-r--r-- | fs-tracer-common/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs-tracer-common/src/lib.rs b/fs-tracer-common/src/lib.rs index b8fcb1a..77ee0e5 100644 --- a/fs-tracer-common/src/lib.rs +++ b/fs-tracer-common/src/lib.rs @@ -19,7 +19,7 @@ impl fmt::Debug for WriteSyscallBPF { f.debug_struct("WriteSyscallArgs") .field("pid", &self.pid) .field("fd", &self.fd) - .field("buf", &unsafe { str::from_utf8_unchecked(&self.buf) }) + .field("buf", &str::from_utf8(&self.buf).unwrap_or("") ) .field("count", &self.count) .finish() } |