+2011-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * elf_getdata_rawchunk.c (elf_getdata_rawchunk): Fix off64_t overflow
+ when MAXIMUM_SIZE == ~0.
+
2010-08-18 Roland McGrath <roland@redhat.com>
* gelf_fsize.c (__libelf_type_sizes): Add entries for ELF_T_LIB
return NULL;
}
- if (unlikely (size > elf->maximum_size
- || (off64_t) (elf->maximum_size - size) < offset))
+ if (unlikely (offset < 0 || offset + (off64_t) size < offset
+ || offset + size > elf->maximum_size))
{
/* Invalid request. */
__libelf_seterrno (ELF_E_INVALID_OP);