diff options
| author | Baitinq <[email protected]> | 2024-01-15 00:16:16 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2024-01-15 00:16:16 +0100 |
| commit | 518f5a51e39b4762be84d757bc080c50a027f364 (patch) | |
| tree | 7a98ea61fcdf846d71c260dd32d6990c2e7cd80c /fs-tracer-common | |
| parent | Send write_syscall events to userspace (diff) | |
| download | fs-tracer-518f5a51e39b4762be84d757bc080c50a027f364.tar.gz fs-tracer-518f5a51e39b4762be84d757bc080c50a027f364.tar.bz2 fs-tracer-518f5a51e39b4762be84d757bc080c50a027f364.zip | |
Add comments
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() } |