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

2018-12-03 Thread Daniel Borkmann
On 12/03/2018 11:39 AM, 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. Lee Ap

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

2018-12-03 Thread Song Liu
On Mon, Dec 3, 2018 at 2:40 AM 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 v2] samples: bpf: fix: seg fault with NULL pointer arg

2018-12-03 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