From 3991c7acb29aa8d7d52150695eb3efa03a08dd50 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 14 Dec 2020 12:40:13 +0000 Subject: [PATCH] Fix a use of an uninitialised variable in the bfd linker. PR 27050 * lexsup.c (parse_args): Ensure that the longind local variable is set. --- ld/ChangeLog | 6 ++++++ ld/lexsup.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 0f5991356a9..fcc3b9b7766 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2020-12-14 Nick Clifton + + PR 27050 + * lexsup.c (parse_args): Ensure that the longind local variable is + set. + 2020-12-14 Alan Modra PR 27064 diff --git a/ld/lexsup.c b/ld/lexsup.c index 0d10bc6fba8..88e33a17a08 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -718,7 +718,7 @@ parse_args (unsigned argc, char **argv) last_optind = -1; while (1) { - int longind; + int longind = 0; int optc; static unsigned int defsym_count; -- 2.30.2