Hi Mark, On Wed, Nov 6, 2024 at 2:13 PM Mark Wielaard <m...@klomp.org> wrote: > > Some compilers assume the second call to elf[32|64]_getshdr can fail > and produce error: potential null pointer dereference. Just store the > result of the first call and reuse (when not NULL). > > * libelf/elf_compress.c (elf_compress): Store getshdr result in > a shdr union var. > * libelf/elf_compress_gnu.c (): Likewise > > https://sourceware.org/bugzilla/show_bug.cgi?id=32311 > > Signed-off-by: Mark Wielaard <m...@klomp.org> > --- > libelf/elf_compress.c | 55 +++++++++++++++++++++------------------ > libelf/elf_compress_gnu.c | 45 ++++++++++++++------------------ > 2 files changed, 48 insertions(+), 52 deletions(-)
LGTM. Aaron