WSL2-Linux-Kernel/samples
Daniel T. Lee d59dd69d55 samples: bpf: fix: seg fault with NULL pointer arg
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>
2018-12-03 23:58:03 +01:00
..
auxdisplay
bpf samples: bpf: fix: seg fault with NULL pointer arg 2018-12-03 23:58:03 +01:00
configfs
connector
hidraw
hw_breakpoint
kdb
kfifo
kobject
kprobes
livepatch
mei
mic/mpssd
pktgen
qmi
rpmsg
seccomp
statx
timers
trace_events
trace_printk
uhid
v4l
vfio-mdev
watchdog
Kconfig
Makefile