linux-stable/tools/lib
Dan Carpenter cbfcc7c4cc libbpf: fix an snprintf() overflow check
[ Upstream commit b77ffb30cf ]

The snprintf() function returns the number of bytes it *would* have
copied if there were enough space.  So it can return > the
sizeof(gen->attach_target).

Fixes: 6723474373 ("libbpf: Generate loader program out of BPF ELF file.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/YtZ+oAySqIhFl6/J@kili
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 14:23:32 +02:00
..
api
bpf libbpf: fix an snprintf() overflow check 2022-08-17 14:23:32 +02:00
lockdep
perf perf tools: Fix segfault accessing sample_id xyarray 2022-04-27 14:38:50 +02:00
subcmd libsubcmd: Fix use-after-free for realloc(..., 0) 2022-02-23 12:03:12 +01:00
symbol
traceevent KVM: x86/mmu: Rename "nxe" role bit to "efer_nx" for macro shenanigans 2021-06-24 18:00:41 -04:00
argv_split.c
bitmap.c tools lib: Adopt bitmap_intersects() operation from the kernel sources 2021-06-30 15:28:00 -03:00
ctype.c
find_bit.c tools: sync lib/find_bit implementation 2021-05-06 19:24:12 -07:00
hweight.c
rbtree.c
str_error_r.c
string.c
vsprintf.c
zalloc.c