From 6d0b564103dc4184be2685727d95643d7263ddca Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Wed, 21 Mar 2018 19:09:52 +0100 Subject: [PATCH] tests/bpf.c: add a check for NULL bpf_attr pointer * tests/bpf.c (main): Add a check with 0 passed in the third argument. --- tests/bpf.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/bpf.c b/tests/bpf.c index 13a6b11c..42d21d97 100644 --- a/tests/bpf.c +++ b/tests/bpf.c @@ -743,6 +743,10 @@ main(void) TEST_BPF(BPF_OBJ_GET_INFO_BY_FD); # endif + sys_bpf(0xfacefeed, 0, (kernel_ulong_t) 0xfacefeedbadc0dedULL); + printf("bpf(0xfacefeed /* BPF_??? */, NULL, %u) = %s\n", + 0xbadc0dedu, errstr); + sys_bpf(0xfacefeed, end_of_page, 40); printf("bpf(0xfacefeed /* BPF_??? */, %#lx, 40) = %s\n", end_of_page, errstr); -- 2.40.0