diff --git a/src/7-execsnoop/README.md b/src/7-execsnoop/README.md index e38b02c..8330cb9 100644 --- a/src/7-execsnoop/README.md +++ b/src/7-execsnoop/README.md @@ -52,7 +52,7 @@ int tracepoint__syscalls__sys_enter_execve(struct trace_event_raw_sys_enter* ctx { u64 id; pid_t pid, tgid; - struct event event; + struct event event={0}; struct task_struct *task; uid_t uid = (u32)bpf_get_current_uid_gid(); diff --git a/src/7-execsnoop/execsnoop.bpf.c b/src/7-execsnoop/execsnoop.bpf.c index 4ea9978..50544fb 100644 --- a/src/7-execsnoop/execsnoop.bpf.c +++ b/src/7-execsnoop/execsnoop.bpf.c @@ -15,7 +15,7 @@ int tracepoint__syscalls__sys_enter_execve(struct trace_event_raw_sys_enter* ctx { u64 id; pid_t pid, tgid; - struct event event; + struct event event={0}; struct task_struct *task; uid_t uid = (u32)bpf_get_current_uid_gid();