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 tools api fs: Cache cgroupfs mount point 2021-02-17 15:09:08 -03:00
bpf libbpf: fix an snprintf() overflow check 2022-08-17 14:23:32 +02:00
lockdep .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
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 libsymbols kallsyms: Move hex2u64 out of header 2020-05-05 16:35:32 -03:00
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 tools/: replace HTTP links with HTTPS ones 2020-08-07 11:33:21 -07:00
str_error_r.c
string.c tools lib: Adopt memchr_inv() from kernel 2020-11-27 08:34:52 -03:00
vsprintf.c
zalloc.c