[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFA] coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error?
From: |
Michael Snyder |
Subject: |
[RFA] coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error? |
Date: |
Thu, 03 Mar 2011 11:12:34 -0800 |
User-agent: |
Thunderbird 2.0.0.24 (X11/20101201) |
If rel-r_type is equal to ARRA_SIZE, it will overflow the array.
What say you?
2011-03-03 Michael Snyder <address@hidden>
* coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
Index: coff-x86_64.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-x86_64.c,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 coff-x86_64.c
--- coff-x86_64.c 31 Mar 2010 16:32:02 -0000 1.12
+++ coff-x86_64.c 3 Mar 2011 19:07:58 -0000
@@ -546,7 +546,7 @@ coff_amd64_rtype_to_howto (bfd *abfd ATT
{
reloc_howto_type *howto;
- if (rel->r_type > ARRAY_SIZE (howto_table))
+ if (rel->r_type >= ARRAY_SIZE (howto_table))
{
bfd_set_error (bfd_error_bad_value);
return NULL;
- [RFA] coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error?,
Michael Snyder <=