[binutils-gdb/binutils-2_30-branch] Fix uninitialised memory acccess in COFF bfd backend
Christophe Lyon
clyon@sourceware.org
Tue May 15 12:43:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d520d4956e59bd4759932a4d1742828f88c0dd7a
commit d520d4956e59bd4759932a4d1742828f88c0dd7a
Author: Christophe Guillon <christophe.guillon@st.com>
Date: Tue May 15 12:27:45 2018 +0000
Fix uninitialised memory acccess in COFF bfd backend
Backported from master.
2018-05-15 Christophe Guillon <christophe.guillon@st.com>
* coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
of the aux structure are initialised.
Change-Id: I81be255ac6611afbe00995fac550e98e6a07e5df
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/coffcode.h | 3 +++
2 files changed, 8 insertions(+)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3889b27..c9b0ab5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2018-05-15 Christophe Guillon <christophe.guillon@st.com>
+
+ * coffcode.h (coff_bigobj_swap_aux_in): Make sure that all fields
+ of the aux structure are initialised.
+
2018-05-15 Nick Clifton <nickc@redhat.com>
* po/pt.po: New Portuguese translation.
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index ec0103e..b7a0e9e 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -5864,6 +5864,9 @@ coff_bigobj_swap_aux_in (bfd *abfd,
AUXENT_BIGOBJ *ext = (AUXENT_BIGOBJ *) ext1;
union internal_auxent *in = (union internal_auxent *) in1;
+ /* Make sure that all fields in the aux structure are
+ initialised. */
+ memset (in, 0, sizeof * in);
switch (in_class)
{
case C_FILE:
More information about the Binutils-cvs
mailing list