Re: [PATCH bpf-next 3/4] selftests/bpf: Add a null pointer check for the load_btf_spec

2024-04-24 Thread Markus Elfring
… > Add the malloc failure checking to avoid possible null > dereference. … How do you think about the following wording variant? Add a return value check so that a null pointer dereference will be avoided after a memory allocation failure. Would you like to add the tag “Fixes” accordingl

[PATCH bpf-next 3/4] selftests/bpf: Add a null pointer check for the load_btf_spec

2024-04-23 Thread Kunwu Chan
There is a 'malloc' call, which can be unsuccessful. Add the malloc failure checking to avoid possible null dereference. Signed-off-by: Kunwu Chan --- tools/testing/selftests/bpf/test_verifier.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/bpf/test_verifier.c b/