diff options
author | Nick Clifton <nickc@redhat.com> | 2014-11-11 16:15:47 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-11-11 16:15:47 +0000 |
commit | 541a3cbda9de8ae8888906cfe14887c394a3f772 (patch) | |
tree | d0b25201e4436fcd704c014f2e2a4126531f7a11 /binutils | |
parent | 201159ecec7e17600df4153e5d4e7a145f0c7cfe (diff) | |
download | gdb-541a3cbda9de8ae8888906cfe14887c394a3f772.zip gdb-541a3cbda9de8ae8888906cfe14887c394a3f772.tar.gz gdb-541a3cbda9de8ae8888906cfe14887c394a3f772.tar.bz2 |
Prevent a buffer overrun whilst displaying corrupt ARM tags.
PR binutils/17531
* readelf.c (display_arm_attribute): Avoid reading off the end of
the buffer when processing a Tag_nodefaults.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 6 | ||||
-rw-r--r-- | binutils/readelf.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2e71311..f7a58a8 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,9 @@ +2014-11-11 Nick Clifton <nickc@redhat.com> + + PR binutils/17531 + * readelf.c (display_arm_attribute): Avoid reading off the end of + the buffer when processing a Tag_nodefaults. + 2014-11-10 Nick Clifton <nickc@redhat.com> PR binutils/17531 diff --git a/binutils/readelf.c b/binutils/readelf.c index 91d5581..0830960 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -12054,7 +12054,9 @@ display_arm_attribute (unsigned char * p, break; case 64: /* Tag_nodefaults. */ - p++; + /* PR 17531: file: 001-505008-0.01. */ + if (p < end) + p++; printf (_("True\n")); break; |