Re: [PATCH 6/9] doc: Add elf32_newehdr.3 and elf64_newehdr.3

2024-08-28 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-08-14 at 17:33 -0400, Aaron Merey wrote: > diff --git a/doc/elf32_newehdr.3 b/doc/elf32_newehdr.3 > new file mode 100644 > index ..95f8f16d > --- /dev/null > +++ b/doc/elf32_newehdr.3 > @@ -0,0 +1,53 @@ > +.TH ELF32_NEWEHDR 3 2024-08-14 "Libelf" "Libelf Programmer's

Re: [PATCH 7/9] doc: Add elf32_newphdr.3 and elf64_newphdr.3

2024-08-28 Thread Mark Wielaard
Hi Aaron, On Wed, 2024-08-14 at 17:33 -0400, Aaron Merey wrote: > diff --git a/doc/elf32_newphdr.3 b/doc/elf32_newphdr.3 > new file mode 100644 > index ..8f55566c > --- /dev/null > +++ b/doc/elf32_newphdr.3 > @@ -0,0 +1,62 @@ > +.TH ELF32_NEWPHDR 3 2024-08-14 "Libelf" "Libelf Programmer'

Re: [PATCH 8/9] doc: Add elf32_xlatetof.3 and elf64_xlatetof.3

2024-08-28 Thread Mark Wielaard
Hi Aaron, I would recommend combining these two with the next two from [PATCH 9/9] doc: Add elf32_xlatetom.3 and elf64_xlatetom.3. They essentially do the same things. On Wed, 2024-08-14 at 17:33 -0400, Aaron Merey wrote: > diff --git a/doc/elf32_xlatetof.3 b/doc/elf32_xlatetof.3 > new file mode

[PATCH] elf*_xlatetof: do not check ELF_T_NHDR[8] has integer number of records

2024-08-28 Thread Mark Wielaard
commit bc0f7450c "elf*_xlatetom: do not check ELF_T_NHDR has integer number of records" fixed https://bugzilla.redhat.com/show_bug.cgi?id=835877 But only for xlatetom. Do the same for xlatetof. * elf32_xlatetof.c (elfw2(LIBELFBITS, xlatetof)): Do not check for integer number of recor

[PATCH] libelf: Don't crash elf[32|64]_xlateto[fm] on bad arguments.

2024-08-28 Thread Mark Wielaard
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 --- libelf/elf32_xlatetof