Commit af91af33 authored by Ruslan Semchenko's avatar Ruslan Semchenko Committed by Alexei Starovoitov
Browse files

tools/bpf_jit_disasm: Fix potential negative tpath index in get_exec_path()



If readlink() fails, len will be -1, which can cause negative indexing
and undefined behavior. This patch ensures that len is set to 0 on
readlink failure, preventing such issues.

Signed-off-by: default avatarRuslan Semchenko <uncleruc2075@gmail.com>
Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20250612131816.1870-1-uncleruc2075@gmail.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 0e93df45
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment