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.
1 file changed