On 32bit arches size_t is too small to do size and overflow checks
of 64bit ELF files. Use the actual Elf64 types to make sure checks
on 64bit ELF files are done correctly on 32bit arches.
Signed-off-by: Mark Wielaard <mjw@redhat.com>
+2014-11-16 Mark Wielaard <mjw@redhat.com>
+
+ * elf_getdata.c (__libelf_set_rawdata_wrlock): Declare offset, size
+ and align as Elf64_Off and Elf64_Xword not size_t.
+
2014-11-14 Mark Wielaard <mjw@redhat.com>
* gelf_getnote.c (gelf_getnote): Check offset overflow.
internal_function
__libelf_set_rawdata_wrlock (Elf_Scn *scn)
{
- size_t offset;
- size_t size;
- size_t align;
+ Elf64_Off offset;
+ Elf64_Xword size;
+ Elf64_Xword align;
int type;
Elf *elf = scn->elf;