summaryrefslogtreecommitdiff
path: root/ioriotng.bpf.c
diff options
context:
space:
mode:
Diffstat (limited to 'ioriotng.bpf.c')
-rw-r--r--ioriotng.bpf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ioriotng.bpf.c b/ioriotng.bpf.c
index e20c314..79783d5 100644
--- a/ioriotng.bpf.c
+++ b/ioriotng.bpf.c
@@ -25,6 +25,7 @@ int handle_enter_openat(struct trace_event_raw_sys_enter *ctx) {
ev->tid = bpf_get_current_pid_tgid();
ev->time = bpf_ktime_get_ns();
+ __builtin_memset(&(ev->filename), 0, sizeof(ev->filename) + sizeof(ev->comm));
bpf_probe_read_user_str(ev->filename, sizeof(ev->filename), (void *)ctx->args[1]);
bpf_get_current_comm(&ev->comm, sizeof(ev->comm));
bpf_ringbuf_submit(ev, 0);