libbpf: Fix another potential overflow issue in bpf_prog_linfo
authorAndrii Nakryiko <andriin@fb.com>
Thu, 7 Nov 2019 02:08:53 +0000 (18:08 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 7 Nov 2019 15:20:38 +0000 (16:20 +0100)
commitdd3ab126379ec040b3edab8559f9c72de6ef9d29
tree7ff757172c2fe2ab17556472f38d05b09d28b20b
parent4ee1135615713387b869dfd099ffdf8656be6784
libbpf: Fix another potential overflow issue in bpf_prog_linfo

Fix few issues found by Coverity and LGTM.

Fixes: b053b439b72a ("bpf: libbpf: bpftool: Print bpf_line_info during prog dump")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20191107020855.3834758-4-andriin@fb.com
tools/lib/bpf/bpf_prog_linfo.c