selftests/bpf: Fix possible NULL passed to memcpy() with zero size
mainline inclusion from mainline-5.17-rc1 commit 3bd0233f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5EUVD CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3bd0233f388e061c44d36a1ac614a3bb4a851b7e ------------------------------------------------- Prevent sanitizer from complaining about passing NULL into memcpy(), even if it happens with zero size. Signed-off-by: NAndrii Nakryiko <andrii@kernel.org> Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20211124002325.1737739-9-andrii@kernel.org (cherry picked from commit 3bd0233f) Signed-off-by: NWang Yufen <wangyufen@huawei.com>
Showing
想要评论请 注册 或 登录