From: H.J. Lu Date: Tue, 11 Feb 2020 12:26:00 +0000 (-0800) Subject: Clear plugin_data memory X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d07a805c8ffb611b1ee21b30dd16f10ff8b11bf;p=binutils-gdb.git Clear plugin_data memory Clear plugin_data memory since it may be uninitialized. * plugin.c (add_symbols): Clear plugin_data memory. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index fef8bc43004..57b1959ee29 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2020-02-11 H.J. Lu + + * plugin.c (add_symbols): Clear plugin_data memory. + 2020-02-10 H.J. Lu PR binutils/25355 diff --git a/bfd/plugin.c b/bfd/plugin.c index 1edcb57bf3a..5681a6a2913 100644 --- a/bfd/plugin.c +++ b/bfd/plugin.c @@ -448,6 +448,8 @@ add_symbols (void * handle, size_t sym_info_size, name_length; int i; + memset (plugin_data, 0, sizeof (*plugin_data)); + abfd->tdata.plugin_data = plugin_data; /* NB: LTO symbols are owned by LTO plugin. Create a copy so