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 <mail@gmelikov.ru> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #8595 Closes #8596
This commit is contained in:
parent
d93d4b1acd
commit
ac4985e48d
|
@ -857,7 +857,7 @@ recv_impl(const char *snapname, nvlist_t *recvdprops, nvlist_t *localprops,
|
||||||
|
|
||||||
ASSERT3S(g_refcount, >, 0);
|
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));
|
(void) strlcpy(zc.zc_value, snapname, sizeof (zc.zc_value));
|
||||||
|
|
||||||
if (recvdprops != NULL) {
|
if (recvdprops != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue