]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/bpf: Use strscpy in bpftool_helpers.c
authorIhor Solodrai <ihor.solodrai@linux.dev>
Mon, 23 Feb 2026 19:07:20 +0000 (11:07 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 24 Feb 2026 16:19:48 +0000 (08:19 -0800)
commit3ed0bc2d4994c718fb5476b45d4aafec42a1d040
treee4b3db5252e65e37f98e04c6c017544690f16879
parent43277d8f57b490550d33f6f4cb73c28ec6024696
selftests/bpf: Use strscpy in bpftool_helpers.c

Replace strncpy() calls in bpftool_helpers.c with strscpy().

Pass the destination buffer size to detect_bpftool_path() instead of
hardcoding BPFTOOL_PATH_MAX_LEN.

Signed-off-by: Ihor Solodrai <ihor.solodrai@linux.dev>
Link: https://lore.kernel.org/r/20260223190736.649171-5-ihor.solodrai@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/testing/selftests/bpf/bpftool_helpers.c