aboutsummaryrefslogtreecommitdiff
path: root/bfd/peXXigen.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2014-11-07 13:39:15 -0800
committerH.J. Lu <hjl.tools@gmail.com>2014-11-07 13:39:15 -0800
commit0115826241fc07d78fbd9709567b1c35fece4179 (patch)
tree86240140c470deb13c2f7ef854d7ee4a09b74e73 /bfd/peXXigen.c
parentcf61b7473a8ee3b43c4f8f2776075ec8d81d7495 (diff)
downloadgdb-0115826241fc07d78fbd9709567b1c35fece4179.zip
gdb-0115826241fc07d78fbd9709567b1c35fece4179.tar.gz
gdb-0115826241fc07d78fbd9709567b1c35fece4179.tar.bz2
Cast to unsigned long in range checks
* peXXigen.c (pe_print_idata): Cast to unsigned long in range checks.
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r--bfd/peXXigen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index 25f7273..2b63e2a 100644
--- a/bfd/peXXigen.c
+++ b/bfd/peXXigen.c
@@ -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 >= datasize)
+ else if (member - adj + 2 >= (unsigned long) 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 >= datasize)
+ else if (member - adj + 2 >= (unsigned long) datasize)
fprintf (file, _("\t<corrupt: 0x%04lx>"), member);
else
{