aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Ellcey <sellcey@caviumnetworks.com>2017-12-12 13:47:32 -0800
committerSteve Ellcey <sellcey@caviumnetworks.com>2017-12-12 13:47:32 -0800
commiteb4285768bb0608e2c3381d0a5214cae83b1f282 (patch)
tree2a970872ed94cc9b63d8c09f847c8ac75a2b4a77
parentcc683f7ed4a5bd8ce2c9b715581de727b04eb599 (diff)
downloadglibc-eb4285768bb0608e2c3381d0a5214cae83b1f282.tar
glibc-eb4285768bb0608e2c3381d0a5214cae83b1f282.tar.gz
glibc-eb4285768bb0608e2c3381d0a5214cae83b1f282.tar.bz2
glibc-eb4285768bb0608e2c3381d0a5214cae83b1f282.zip
Use memcpy instead of strncpy in nscd/nscd.h to fix build problem with ToT GCC
* nscd/nscd.h (init_traced_file): Change strncpy to memcpy.
-rw-r--r--ChangeLog4
-rw-r--r--nscd/nscd.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 349030069a..817f0d3a1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-12-12 Steve Ellcey <sellcey@cavium.com>
+
+ * nscd/nscd.h (init_traced_file): Change strncpy to memcpy.
+
2017-12-12 Adhemerval Zanella <adhemerval.zanella@linaro.org>
* libio/Makefile (tests): Add tst-bz22415.
diff --git a/nscd/nscd.h b/nscd/nscd.h
index c6b0a3c836..edcb5b6cde 100644
--- a/nscd/nscd.h
+++ b/nscd/nscd.h
@@ -108,7 +108,7 @@ init_traced_file(struct traced_file *file, const char *fname, int crinit)
size_t len = (size_t)(dname - fname);
if (len > sizeof (file->dname))
abort ();
- strncpy (file->dname, file->fname, len);
+ memcpy (file->dname, file->fname, len);
file->dname[len] = '\0';
}
/* The basename is the name just after the last forward slash. */