Skip to content
Commit ecfc6ddb authored by Alan Modra's avatar Alan Modra
Browse files

Re: PE objdump -x

All of these buffer overrun tests are better written as a comparison
against size remaining, due to ISO C 9899 standard 6.5.2 para 8
regarding adding a constant to a pointer:

"If both the pointer operand and the result point to elements of the
same array object, or one past the last element of the array object,
the evaluation shall not produce an overflow; otherwise, the behavior
is undefined."

So "ex_dta + 4" might be undefined behaviour, if you interpret "the
array object" in this case to be the malloc'd section contents!

	* pei-x86_64.c (pex64_get_unwind_info): Tidy sanity checks.
	(pex64_xdata_print_uwd_codes): Likewise.
parent 5844ccaa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment