Skip to content
Commit b77ffb30 authored by Dan Carpenter's avatar Dan Carpenter Committed by Alexei Starovoitov
Browse files

libbpf: fix an snprintf() overflow check



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: 67234743 ("libbpf: Generate loader program out of BPF ELF file.")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/r/YtZ+oAySqIhFl6/J@kili


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent c5d22f4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment