Prevent a buffer overrun whilst displaying corrupt ARM tags.
authorNick Clifton <nickc@redhat.com>
Tue, 11 Nov 2014 16:15:47 +0000 (16:15 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 11 Nov 2014 16:15:47 +0000 (16:15 +0000)
PR binutils/17531
* readelf.c (display_arm_attribute): Avoid reading off the end of
the buffer when processing a Tag_nodefaults.

binutils/ChangeLog
binutils/readelf.c

index 2e71311f49a040b2592261477a4e2b7eebbf225c..f7a58a88a0bf1b1c95eba1672c97dd2d7587a16d 100644 (file)
@@ -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
index 91d55815658f22a931cf3acfd4eb10da0efb3378..083096090e9122e42153159fbb5bdc0e1a726ed4 100644 (file)
@@ -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;
 
This page took 0.03439 seconds and 4 git commands to generate.