diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 4a620a9da..710bc1912 100644 --- a/lib/libzfs/libzfs_sendrecv.c +++ b/lib/libzfs/libzfs_sendrecv.c @@ -3801,8 +3801,9 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap, } ASSERT(strstr(drrb->drr_toname, sendfs) == drrb->drr_toname); - ASSERT(chopprefix > drrb->drr_toname); - ASSERT(chopprefix <= drrb->drr_toname + strlen(drrb->drr_toname)); + ASSERT(chopprefix > drrb->drr_toname || strchr(sendfs, '/') == NULL); + ASSERT(chopprefix <= drrb->drr_toname + strlen(drrb->drr_toname) || + strchr(sendfs, '/') == NULL); ASSERT(chopprefix[0] == '/' || chopprefix[0] == '@' || chopprefix[0] == '\0'); |