aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog4
-rw-r--r--gold/plugin.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 05a6f26..e152e1e 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,7 @@
+2020-12-07 Alan Modra <amodra@gmail.com>
+
+ * plugin.cc (Plugin_recorder::init): Replace strncpy with memcpy.
+
2020-12-03 Alan Modra <amodra@gmail.com>
* testsuite/Makefile.am (pr26936a.o): Pass -mx86-used-note=yes.
diff --git a/gold/plugin.cc b/gold/plugin.cc
index 729ddca..fd37957 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -525,7 +525,7 @@ Plugin_recorder::init()
size_t len = strlen(dir_template) + 1;
char* tempdir = new char[len];
- strncpy(tempdir, dir_template, len);
+ memcpy(tempdir, dir_template, len);
// Create the log file.
std::string logname(tempdir);