[PATCH] readelf: Fix typo in a check in handle_relocs_rela

Mark Wielaard mjw at redhat.com
Tue Sep 23 12:25:48 UTC 2014


On Sun, 2014-09-14 at 01:03 +0200, Petr Machata wrote:
> - Testing shdr makes no sense, that pointer was dereferenced several
>   times throughout the section.  destshdr on the other hand is not
>   tested at all.
>
> +2014-09-14  Petr Machata  <pmachata at redhat.com>
> +
> +	* readelf.c (handle_relocs_rela): Typo fix, test DESTSHDR properly.

Yes, seems obviously correct to me. The else branch would crash and burn
when trying to dereference destshdr->sh_name otherwise.

Thanks,

Mark


More information about the elfutils-devel mailing list