samples/bpf: Fix wrong allocation size in xdp_router_ipv4_user
authorRong Tao <rongtao@cestc.cn>
Tue, 22 Nov 2022 02:32:56 +0000 (10:32 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 24 Nov 2022 23:21:29 +0000 (00:21 +0100)
commit19a2bdbaaddc71405494bd35fa034d9cf582b05e
tree6289803908f759c1fbd96dace44a5e6902027e11
parentb74344cbede22fdfc1366348b3d576eac0131380
samples/bpf: Fix wrong allocation size in xdp_router_ipv4_user

prefix_key->data allocates three bytes using alloca(), but four bytes are
actually accessed in the program.

Signed-off-by: Rong Tao <rongtao@cestc.cn>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/tencent_F9E2E81922B0C181D05B96DAE5AB0ACE6B06@qq.com
samples/bpf/xdp_router_ipv4_user.c