mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-24 12:39:59 +00:00
Correct buffer overrun test
* peXXigen.c (pe_print_idata): Revert last patch, cast lhs instead.
This commit is contained in:
parent
bda7491873
commit
d1f5d98a18
@ -1,3 +1,7 @@
|
||||
2014-11-08 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* peXXigen.c (pe_print_idata): Revert last patch, cast lhs instead.
|
||||
|
||||
2014-11-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* peXXigen.c (pe_print_idata): Cast to unsigned long in range
|
||||
|
@ -1467,7 +1467,7 @@ pe_print_idata (bfd * abfd, void * vfile)
|
||||
member_high, member,
|
||||
WithoutHighBit (member_high), member);
|
||||
/* PR binutils/17512: Handle corrupt PE data. */
|
||||
else if (member - adj + 2 >= (unsigned long) datasize)
|
||||
else if ((bfd_vma) member - adj + 2 >= datasize)
|
||||
fprintf (file, _("\t<corrupt: 0x%04lx>"), member);
|
||||
else
|
||||
{
|
||||
@ -1502,7 +1502,7 @@ pe_print_idata (bfd * abfd, void * vfile)
|
||||
fprintf (file, "\t%04lx\t %4lu <none>",
|
||||
member, WithoutHighBit (member));
|
||||
/* PR binutils/17512: Handle corrupt PE data. */
|
||||
else if (member - adj + 2 >= (unsigned long) datasize)
|
||||
else if ((bfd_vma) member - adj + 2 >= datasize)
|
||||
fprintf (file, _("\t<corrupt: 0x%04lx>"), member);
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user