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 /tests | |
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 'tests')
-rw-r--r-- | tests/zfs-tests/tests/functional/ctime/ctime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/zfs-tests/tests/functional/ctime/ctime.c b/tests/zfs-tests/tests/functional/ctime/ctime.c index ba8af15fe..1cd183234 100644 --- a/tests/zfs-tests/tests/functional/ctime/ctime.c +++ b/tests/zfs-tests/tests/functional/ctime/ctime.c @@ -155,7 +155,7 @@ do_link(const char *pfile) return (-1); } - strncpy(pfile_copy, pfile, sizeof (pfile_copy)); + strncpy(pfile_copy, pfile, sizeof (pfile_copy)-1); pfile_copy[sizeof (pfile_copy) - 1] = '\0'; /* * Figure out source file directory name, and create |