]> git.ipfire.org Git - thirdparty/elfutils.git/commit
gelf_getmove.c: Handle ELFCLASS32 and ELFCLASS64 separately main
authorAaron Merey <amerey@redhat.com>
Wed, 7 Jan 2026 23:43:49 +0000 (18:43 -0500)
committerAaron Merey <amerey@redhat.com>
Fri, 9 Jan 2026 15:36:01 +0000 (10:36 -0500)
commitc460e20886ff916a3159ca15add0ecf348e00997
treec1f88f0f2bb99984bad63c964da25b0838c46af1
parent0f858ac95fc7296f85d95f9b0ab7d6a70085123a
gelf_getmove.c: Handle ELFCLASS32 and ELFCLASS64 separately

Currently gelf_getmove does not distinguish between ELFCLASS32 and
ELFCLASS64 binaries.  This is assumes that Elf32_Move and Elf64_Move
structs are the same size.

This assumption is false since the m_info and m_poffset fields have
type uint32_t for Elf32_Move but uint64_t for Elf64_Move.

Fix this by handling ELFCLASS32 and ELFCLASS64 cases separately when
copying Elfxx_Move fields to dst.

Signed-off-by: Aaron Merey <amerey@redhat.com>
libelf/gelf_getmove.c