diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-03-18 17:46:19 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-03-18 17:46:19 +0000 |
commit | b115cf96d30141e7694bb322f30644d4667495c6 (patch) | |
tree | acc3f170d761fdad99e08d34b9db5e2f1c7e9b7c /binutils | |
parent | 1c40aa62ec258e6d410cbd88754c214d09df0333 (diff) | |
download | gdb-b115cf96d30141e7694bb322f30644d4667495c6.zip gdb-b115cf96d30141e7694bb322f30644d4667495c6.tar.gz gdb-b115cf96d30141e7694bb322f30644d4667495c6.tar.bz2 |
Avoid buffer overflow.
2010-03-18 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (decode_arm_unwind): Increase buf size to 9 byte.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 506ab55..8058db3 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2010-03-18 H.J. Lu <hongjiu.lu@intel.com> + + * readelf.c (decode_arm_unwind): Increase buf size to 9 byte. + 2010-03-17 Alan Modra <amodra@gmail.com> * readelf.c (dump_arm_unwind): Warning fix. diff --git a/binutils/readelf.c b/binutils/readelf.c index c76fc17..beaf947 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -6194,10 +6194,10 @@ decode_arm_unwind (struct arm_unw_aux_info *aux, } else if (op == 0xb2) { - unsigned char buf[5]; + unsigned char buf[9]; unsigned int i, len; unsigned long offset; - for (i = 0; i < 9; i++) + for (i = 0; i < sizeof (buf); i++) { GET_OP (buf[i]); if ((buf[i] & 0x80) == 0) |