Fix buffer overflows in ld when printing translated strings.

ld	* ldmain.c (add_archive_element): Eliminate string buffer.
	* ldlang.c (lang_print_asneeded): Likewise.
This commit is contained in:
Nick Clifton
2017-01-31 12:07:04 +00:00
parent 07fbc63d1e
commit 1273da0414
3 changed files with 7 additions and 9 deletions

View File

@@ -2035,14 +2035,11 @@ static void
lang_print_asneeded (void)
{
struct asneeded_minfo *m;
char buf[100];
if (asneeded_list_head == NULL)
return;
sprintf (buf, _("\nAs-needed library included "
"to satisfy reference by file (symbol)\n\n"));
minfo ("%s", buf);
minfo (_("\nAs-needed library included to satisfy reference by file (symbol)\n\n"));
for (m = asneeded_list_head; m != NULL; m = m->next)
{