]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix uninitialised memory acccess in COFF bfd backend
authorChristophe Guillon <christophe.guillon@st.com>
Tue, 15 May 2018 12:27:45 +0000 (12:27 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Tue, 15 May 2018 12:35:59 +0000 (12:35 +0000)
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

bfd/ChangeLog
bfd/coffcode.h

index 3889b277fdfb68fed3ba556fdbc702da135e5c0c..c9b0ab57b3008e9cc9f7c8312e31f1836a3c7cdb 100644 (file)
@@ -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.
index ec0103e8f624b0d908e2953cbb4e8bf1bb895aff..b7a0e9e6c2c12ce11cd34b038e48bb1866e6dc56 100644 (file)
@@ -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: