diff options
author | Brian Behlendorf <[email protected]> | 2019-04-08 09:10:59 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2019-04-08 09:10:59 -0700 |
commit | ac4985e48dfcf030418df0f0ce9bf153ba12ba03 (patch) | |
tree | 6049fc324b3bdea4f353b57c4a1a00553a271825 | |
parent | d93d4b1acdf53a25ad21e20ddfca3b0d58a06cdf (diff) |
Fix buffer length in strlcpy()
The length used for the strlcpy() used the size of zv_value
when it should have used the size of zc_name. Correct this
typo.
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #8595
Closes #8596
-rw-r--r-- | lib/libzfs_core/libzfs_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs_core/libzfs_core.c b/lib/libzfs_core/libzfs_core.c index e03c19482..8a64396b4 100644 --- a/lib/libzfs_core/libzfs_core.c +++ b/lib/libzfs_core/libzfs_core.c @@ -857,7 +857,7 @@ recv_impl(const char *snapname, nvlist_t *recvdprops, nvlist_t *localprops, ASSERT3S(g_refcount, >, 0); - (void) strlcpy(zc.zc_name, fsname, sizeof (zc.zc_value)); + (void) strlcpy(zc.zc_name, fsname, sizeof (zc.zc_name)); (void) strlcpy(zc.zc_value, snapname, sizeof (zc.zc_value)); if (recvdprops != NULL) { |