aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorChristophe Guillon <christophe.guillon@st.com>2018-05-15 12:27:45 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2018-05-15 12:33:42 +0000
commit810ed4db984d378ca9c8e3d152966fb81c23ef95 (patch)
tree84cfd1b117d3bd36fd71756839c4dc1870a47dc9 /bfd/coffcode.h
parent1678bd35a35a3bace2d4aee39b64d96c638651f0 (diff)
downloadgdb-810ed4db984d378ca9c8e3d152966fb81c23ef95.zip
gdb-810ed4db984d378ca9c8e3d152966fb81c23ef95.tar.gz
gdb-810ed4db984d378ca9c8e3d152966fb81c23ef95.tar.bz2
Fix uninitialised memory acccess in COFF bfd backend
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
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index c63ebd2..6ad991c 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -5528,6 +5528,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: