From: Steve Ellcey Date: Tue, 12 Dec 2017 21:47:32 +0000 (-0800) Subject: Use memcpy instead of strncpy in nscd/nscd.h to fix build problem with ToT GCC X-Git-Tag: glibc-2.27~292 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb4285768bb0608e2c3381d0a5214cae83b1f282;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 349030069aa..817f0d3a1f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2017-12-12 Steve Ellcey + + * nscd/nscd.h (init_traced_file): Change strncpy to memcpy. + 2017-12-12 Adhemerval Zanella * libio/Makefile (tests): Add tst-bz22415. diff --git a/nscd/nscd.h b/nscd/nscd.h index c6b0a3c8360..edcb5b6cde4 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. */