[binutils-gdb] Fix a use of an uninitialised variable in the bfd linker.
Nick Clifton
nickc@sourceware.org
Mon Dec 14 12:40:47 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=3991c7acb29aa8d7d52150695eb3efa03a08dd50
commit 3991c7acb29aa8d7d52150695eb3efa03a08dd50
Author: Nick Clifton <nickc@redhat.com>
Date: Mon Dec 14 12:40:13 2020 +0000
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.
Diff:
---
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 <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
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;
More information about the Binutils-cvs
mailing list