Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f102154d authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Daniel Borkmann
Browse files

libbpf: fix error code returned on corrupted ELF



All of libbpf errors are negative, except this one. Fix it.

Acked-by: default avatarSong Liu <songliubraving@fb.com>
Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent c51829bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1221,7 +1221,7 @@ static int bpf_object__elf_collect(struct bpf_object *obj, int flags)

	if (!obj->efile.strtabidx || obj->efile.strtabidx >= idx) {
		pr_warning("Corrupted ELF file: index of strtab invalid\n");
		return LIBBPF_ERRNO__FORMAT;
		return -LIBBPF_ERRNO__FORMAT;
	}
	if (btf_data) {
		obj->btf = btf__new(btf_data->d_buf, btf_data->d_size);