Avoid buffer overflow.
2010-03-18 H.J. Lu <hongjiu.lu@intel.com> * readelf.c (decode_arm_unwind): Increase buf size to 9 byte.
This commit is contained in:
parent
1c40aa62ec
commit
b115cf96d3
2 changed files with 6 additions and 2 deletions
|
@ -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>
|
2010-03-17 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* readelf.c (dump_arm_unwind): Warning fix.
|
* readelf.c (dump_arm_unwind): Warning fix.
|
||||||
|
|
|
@ -6194,10 +6194,10 @@ decode_arm_unwind (struct arm_unw_aux_info *aux,
|
||||||
}
|
}
|
||||||
else if (op == 0xb2)
|
else if (op == 0xb2)
|
||||||
{
|
{
|
||||||
unsigned char buf[5];
|
unsigned char buf[9];
|
||||||
unsigned int i, len;
|
unsigned int i, len;
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < sizeof (buf); i++)
|
||||||
{
|
{
|
||||||
GET_OP (buf[i]);
|
GET_OP (buf[i]);
|
||||||
if ((buf[i] & 0x80) == 0)
|
if ((buf[i] & 0x80) == 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue