From: Michael Tremer Date: Fri, 3 Jan 2025 18:06:13 +0000 (+0000) Subject: ELF: Fix reading note sections X-Git-Tag: 0.9.30~549 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1a3c3aed2af0cb7ea257d0e6cfa59ae52f9e3003;p=pakfire.git ELF: Fix reading note sections Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/elf.c b/src/pakfire/elf.c index 42139e730..dc6a6df34 100644 --- a/src/pakfire/elf.c +++ b/src/pakfire/elf.c @@ -744,9 +744,10 @@ static int pakfire_elf_check_cf_protection(struct pakfire_elf* self, Elf_Data* d = elf_getdata(section, NULL); // Fetch the .note header - offset = gelf_getnote(data, offset, &nhdr, &offset_name, &offset_data); + offset = gelf_getnote(d, offset, &nhdr, &offset_name, &offset_data); if (!offset) { - ERROR(self->ctx, "Could not read note section: %m\n"); + ERROR(self->ctx, "%s: Could not read note section: %s\n", + self->path, elf_errmsg(-1)); return -errno; }