This is the mail archive of the binutils-cvs@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fix address violation parsing a corrupt ieee binary.


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=62b76e4b6e0b4cb5b3e0053d1de4097b32577049

commit 62b76e4b6e0b4cb5b3e0053d1de4097b32577049
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jun 15 13:08:47 2017 +0100

    Fix address violation parsing a corrupt ieee binary.
    
    	PR binutils/21581
    	(ieee_archive_p): Use a static buffer to avoid compiler bugs.

Diff:
---
 bfd/ChangeLog | 2 ++
 bfd/ieee.c    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7cbd761..5507385 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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>
 
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 0884d87..f7ea4bd 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]