diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | nscd/nscd.h | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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. */ |