libbpf: Use strlcpy() in path resolution fallback logic
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 7 Apr 2022 23:04:45 +0000 (16:04 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 8 Apr 2022 16:16:09 +0000 (09:16 -0700)
commit3c0dfe6e4c43ea0cf252ff4cb7a332423866d488
tree2fbe8d301b1b00aae314aa2fa51acdd02ffb100d
parent700a6ef1fa6096b2782c03a6be41af0f88afad1d
libbpf: Use strlcpy() in path resolution fallback logic

Coverity static analyzer complains that strcpy() can cause buffer
overflow. Use libbpf_strlcpy() instead to be 100% sure this doesn't
happen.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220407230446.3980075-1-andrii@kernel.org
tools/lib/bpf/usdt.c