There's no check against elf.address
#On non position independent executables the base address can be read off the elf.
if PIE is False and base is None:
base = filter(lambda x: x['p_type'] == 'PT_LOAD' and (x.header.p_flags & 1), e.segments)[0]['p_vaddr']
#At this point we should have a base address
if base is None:
log.error('Position independent ELF needs a base address')
There's no check against
elf.address