samples: bpf: fix: seg fault with NULL pointer arg
[ Upstream commit d59dd69d ] When NULL pointer accidentally passed to write_kprobe_events, due to strlen(NULL), segmentation fault happens. Changed code returns -1 to deal with this situation. Bug issued with Smatch, static analysis. Signed-off-by:Daniel T. Lee <danieltimlee@gmail.com> Acked-by:
Song Liu <songliubraving@fb.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net> Signed-off-by:
Sasha Levin <sashal@kernel.org>
Showing
Please register or sign in to comment