zfs/tests/zfs-tests/cmd/libzfs_input_check
Tomohiro Kusumi d5bf1cf179 Fix build break by "Implement Redacted Send/Receive"
30af21b025 broke build on Fedora. gcc can detect potential overflow
on compile-time. Consider strlen of already copied string.

Also change strn to strl variants per suggestion from @behlendorf
and @ofaaland.

--
libzfs_input_check.c: In function 'test_redact':
libzfs_input_check.c:711:2: error: 'strncat' specified bound 288 equals
 destination size [-Werror=stringop-overflow=]
  strncat(bookmark, "#testbookmark", sizeof (bookmark));
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Closes #8939
2019-06-22 16:30:59 -07:00
..
.gitignore Add basic zfs ioc input nvpair validation 2018-09-02 12:14:01 -07:00
Makefile.am Check for strlcat and strlcpy 2018-12-11 16:01:41 -08:00
libzfs_input_check.c Fix build break by "Implement Redacted Send/Receive" 2019-06-22 16:30:59 -07:00