Fix address violation parsing a corrupt ieee binary.
authorNick Clifton <nickc@redhat.com>
Thu, 15 Jun 2017 12:08:47 +0000 (13:08 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 15 Jun 2017 12:08:47 +0000 (13:08 +0100)
PR binutils/21581
(ieee_archive_p): Use a static buffer to avoid compiler bugs.

bfd/ChangeLog
bfd/ieee.c

index 7cbd7611b7f332297bd5158d68c54e441633bf8d..550738531bcdd8cff68236f9b949cae577312699 100644 (file)
@@ -3,6 +3,8 @@
        PR binutils/21582
        * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
        bugs.
+       PR binutils/21581
+       (ieee_archive_p): Likewise.
 
 2017-06-15  Nick Clifton  <nickc@redhat.com>
 
index 0884d87a7b5afa997a083ffb24a190d415702cd6..f7ea4bd3e2b7fcce5a74d9235360b62c3b200ba7 100644 (file)
@@ -1355,7 +1355,7 @@ ieee_archive_p (bfd *abfd)
 {
   char *library;
   unsigned int i;
-  unsigned char buffer[512];
+  static unsigned char buffer[512];
   file_ptr buffer_offset = 0;
   ieee_ar_data_type *save = abfd->tdata.ieee_ar_data;
   ieee_ar_data_type *ieee;