Fix a use of an uninitialised variable in the bfd linker.
authorNick Clifton <nickc@redhat.com>
Mon, 14 Dec 2020 12:40:13 +0000 (12:40 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 14 Dec 2020 12:40:13 +0000 (12:40 +0000)
PR 27050
* lexsup.c (parse_args): Ensure that the longind local variable is
set.

ld/ChangeLog
ld/lexsup.c

index 0f5991356a9d547e42956b6d490e76e8683cc3e5..fcc3b9b77661fba319a252e8cd7e9a70a7c2317b 100644 (file)
@@ -1,3 +1,9 @@
+2020-12-14  Nick Clifton  <nickc@redhat.com>
+
+       PR 27050
+       * lexsup.c (parse_args): Ensure that the longind local variable is
+       set.
+
 2020-12-14  Alan Modra  <amodra@gmail.com>
 
        PR 27064
index 0d10bc6fba8a139207449ff224dec9471f0aee0d..88e33a17a0835c3be139be3123a73717f9ee6dd8 100644 (file)
@@ -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;