]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libelf: Don't crash elf[32|64]_xlateto[fm] on bad arguments.
authorMark Wielaard <mark@klomp.org>
Wed, 28 Aug 2024 21:58:58 +0000 (23:58 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 11 Sep 2024 15:09:53 +0000 (17:09 +0200)
commit30df1adeab5a9285830042b446a828319c6aa743
tree6eca24ca0d1ab24990bdc7442efe2a12a6456000
parent41022b0bfd934b37cdf9572d27048263b118f252
libelf: Don't crash elf[32|64]_xlateto[fm] on bad arguments.

Check that src and dest aren't NULL and that src->d_type < ELF_T_NUM.

      * elf32_xlatetof.c (elfw2(LIBELFBITS, xlatetof)): Check src, dest
      and src->d_type are valid.
      * elf32_xlatetom.c (elfw2(LIBELFBITS, xlatetom)): Likewise.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libelf/elf32_xlatetof.c
libelf/elf32_xlatetom.c