PE objdump -x
Hannes Domani
ssbssa@yahoo.de
Tue Aug 2 10:46:52 GMT 2022
Am Dienstag, 2. August 2022 um 09:47:17 MESZ hat Alan Modra via Binutils <binutils@sourceware.org> Folgendes geschrieben:
> objdump -x on PE executables produces lots of "xdata section corrupt"
> and "corrupt unwind data" warnings, and refuses to dump that info. It
> turns out that the sanity checks were bad, not the data. Fix them.
>
> * pei-x86_64.c (pex64_get_unwind_info): Correct buffer overrun
> sanity checks.
> (pex64_xdata_print_uwd_codes): Similarly.
>
> diff --git a/bfd/pei-x86_64.c b/bfd/pei-x86_64.c
> index 7d8fc8f0721..795bf66f8b4 100644
> --- a/bfd/pei-x86_64.c
> +++ b/bfd/pei-x86_64.c
> @@ -109,7 +109,7 @@ pex64_get_unwind_info (bfd *abfd, struct pex64_unwind_info *ui,
>
> memset (ui, 0, sizeof (struct pex64_unwind_info));
>
> - if (ex_dta >= ex_dta_end || ex_dta + 4 >= ex_dta_end)
> + if (ex_dta >= ex_dta_end || ex_dta + 4 > ex_dta_end)
> return false;
Are here really both if-conditions necessary?
Regards
Hannes
More information about the Binutils
mailing list