diff options
author | mav <mav@FreeBSD.org> | 2016-10-12 05:10:05 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-10-12 05:10:05 +0000 |
commit | 3fa898372d7944fa7a133e94e69a6bb2ccdecc2d (patch) | |
tree | 01c586d584af30c0b197deff68fe6f28c1551612 /cddl/contrib/opensolaris/lib/libzfs | |
parent | 7e195ca08999e2e8c64c31a9abf5ebd8554223de (diff) | |
download | FreeBSD-src-3fa898372d7944fa7a133e94e69a6bb2ccdecc2d.zip FreeBSD-src-3fa898372d7944fa7a133e94e69a6bb2ccdecc2d.tar.gz |
MFC r305202: MFV r302654:
6879 incorrect endianness swap for drr_spill.drr_length in libzfs_sendrecv.c
illumos/illumos-gate@20fea7a47472aceb64d3ed48cc2a3ea268bc4795
https://github.com/illumos/illumos-gate/commit/20fea7a47472aceb64d3ed48cc2a3ea26
8bc4795
https://www.illumos.org/issues/6879
In libzfs_sendrecv, there's a typo:
case DRR_SPILL:
if (byteswap) {
drr->drr_u.drr_write.drr_length =
BSWAP_64(drr->drr_u.drr_spill.drr_length);
}
Instead of drr_write.drr_length, we should be assigning the result of the
byteswap to drr_spill.drr_length.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Dan Kimmel <dan.kimmel@delphix.com>
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c index b2c16c8..bc8c788 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c @@ -2968,7 +2968,7 @@ recv_skip(libzfs_handle_t *hdl, int fd, boolean_t byteswap) break; case DRR_SPILL: if (byteswap) { - drr->drr_u.drr_write.drr_length = + drr->drr_u.drr_spill.drr_length = BSWAP_64(drr->drr_u.drr_spill.drr_length); } (void) recv_read(hdl, fd, buf, |