diff options
author | Joao Carlos Mendes Luis <[email protected]> | 2018-08-26 16:55:44 -0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-08-26 12:55:44 -0700 |
commit | 5d6ad2442b0ac97922403edda848697c9e9de399 (patch) | |
tree | f178a893026cbd88c3a6ad5519da8521a2304935 /lib/libshare | |
parent | 644e01a268ad55dc789a79982d62d3db59660499 (diff) |
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 <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Issue #7368
Closes #7826
Closes #7830
Diffstat (limited to 'lib/libshare')
-rw-r--r-- | lib/libshare/smb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libshare/smb.c b/lib/libshare/smb.c index ffae5699c..4c2045dfd 100644 --- a/lib/libshare/smb.c +++ b/lib/libshare/smb.c @@ -219,7 +219,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; |