From: H.J. Lu Date: Fri, 7 Nov 2014 21:39:15 +0000 (-0800) Subject: Cast to unsigned long in range checks X-Git-Tag: gdb-7.9.0-release~708 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0115826241fc07d78fbd9709567b1c35fece4179;p=external%2Fbinutils.git Cast to unsigned long in range checks * peXXigen.c (pe_print_idata): Cast to unsigned long in range checks. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8fb37c6..dfa8c19 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2014-11-07 H.J. Lu + * peXXigen.c (pe_print_idata): Cast to unsigned long in range + checks. + +2014-11-07 H.J. Lu + PR ld/17482 * elf64-x86-64.c (elf_x86_64_relocate_section): Update comments for IE->LE transition. 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"), member); else { @@ -1502,7 +1502,7 @@ pe_print_idata (bfd * abfd, void * vfile) fprintf (file, "\t%04lx\t %4lu ", 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"), member); else {