Fixed segfault when malformed ELF

fix me, fix me, one more time