From eb4285768bb0608e2c3381d0a5214cae83b1f282 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Tue, 12 Dec 2017 13:47:32 -0800 Subject: 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. --- nscd/nscd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nscd/nscd.h') diff --git a/nscd/nscd.h b/nscd/nscd.h index c6b0a3c..edcb5b6 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. */ -- cgit v1.1