From 8ca5537ba56b72518353541784b2b0a49c978893 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 11 May 2021 21:30:14 +0930 Subject: PR27844, Unstable symbol name in objdump outputs Special care for fuzzers. 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. --- bfd/aoutx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bfd/aoutx.h') 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; -- cgit v1.1