Fedora 28: Fix misc bounds check compiler warnings

Fix a bunch of truncation compiler warnings that show up
on Fedora 28 (GCC 8.0.1).

Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #7368
Closes #7826
Closes #7830
This commit is contained in:
Joao Carlos Mendes Luis
2018-08-26 16:55:44 -03:00
committed by Tony Hutter
parent 4356dd23a9
commit 3ea1f7f193
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ smb_enable_share_one(const char *sharename, const char *sharepath)
int rc;
/* Support ZFS share name regexp '[[:alnum:]_-.: ]' */
strncpy(name, sharename, sizeof (name));
strlcpy(name, sharename, sizeof (name));
name [sizeof (name)-1] = '\0';
pos = name;