This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Fix address violation parsing a corrupt ieee binary.
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 15 Jun 2017 12:09:30 -0000
- Subject: [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;