aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/aoutx.h2
-rw-r--r--bfd/pdp11.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6af8c1a..bd5d4f7 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2021-05-11 Alan Modra <amodra@gmail.com>
+
+ PR 27844
+ * pdp11.c (aout_get_external_symbols): Clear first four bytes of
+ strings array, not just the first byte.
+ * aoutx.h (aout_get_external_symbols): Likewise.
+
2021-05-10 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/27839
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index 76bb13c..17560bd 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -1364,7 +1364,7 @@ aout_get_external_symbols (bfd *abfd)
}
}
/* Ensure that a zero index yields an empty string. */
- strings[0] = '\0';
+ memset (strings, 0, BYTES_IN_WORD);
/* Ensure that the string buffer is NUL terminated. */
strings[stringsize] = 0;
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 75ddf20..2c9fe0a 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -1344,7 +1344,7 @@ aout_get_external_symbols (bfd *abfd)
}
}
/* Ensure that a zero index yields an empty string. */
- strings[0] = '\0';
+ memset (strings, 0, BYTES_IN_LONG);
/* Ensure that the string buffer is NUL terminated. */
strings[stringsize] = 0;