mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 17:53:37 +08:00
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.
This commit is contained in:
parent
cc683f7ed4
commit
eb4285768b
@ -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.
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user