Re: [PATCH] samples: bpf: fix: seg fault with NULL pointer arg

2018-12-02 Thread Song Liu
On Sat, Dec 1, 2018 at 1:07 PM Daniel T. Lee wrote: > > 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.

[PATCH] samples: bpf: fix: seg fault with NULL pointer arg

2018-12-01 Thread Daniel T. Lee
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 --- samples/bpf/bpf_load.c | 4 +++- 1 file changed, 3 insert