aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-12-14 12:40:13 +0000
committerNick Clifton <nickc@redhat.com>2020-12-14 12:40:13 +0000
commit3991c7acb29aa8d7d52150695eb3efa03a08dd50 (patch)
tree62c8113c6e4b053fdb8c82ecae0cb92e61499a0d /ld
parent6abe7848fa4140b3cb79c6810758b21562efdc0d (diff)
downloadgdb-3991c7acb29aa8d7d52150695eb3efa03a08dd50.zip
gdb-3991c7acb29aa8d7d52150695eb3efa03a08dd50.tar.gz
gdb-3991c7acb29aa8d7d52150695eb3efa03a08dd50.tar.bz2
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog6
-rw-r--r--ld/lexsup.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 0f59913..fcc3b9b 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 0d10bc6..88e33a1 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;