From: Waldemar Kozaczuk <[email protected]> Committer: Nadav Har'El <[email protected]> Branch: master
zfs: replace strncpy with safer strlcpy which is detected by gcc 10 Signed-off-by: Waldemar Kozaczuk <[email protected]> Message-Id: <[email protected]> --- diff --git a/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c --- a/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c +++ b/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c @@ -698,7 +698,7 @@ zfs_get_parent(const char *datasetname, char *parent, int parentsize) /* * Remove the @bla or /bla from the end of the name to get the parent. */ - (void) strncpy(parent, datasetname, parentsize); + (void) strlcpy(parent, datasetname, parentsize); cp = strrchr(parent, '@'); if (cp != NULL) { cp[0] = '\0'; -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/00000000000046ed6c05a4eeba70%40google.com.
