Commit d4d3e5a0 authored by Fam Zheng's avatar Fam Zheng Committed by Jeff Cody
Browse files

block: Fix parameter checking in bdrv_co_copy_range_internal



src may be NULL if BDRV_REQ_ZERO_WRITE flag is set, in this case only
check dst and dst->bs. This bug was introduced when moving in the
request tracking code from bdrv_co_copy_range, in 37aec7d7.

This especially fixes the possible segfault when initializing src_bs
with a NULL src.

Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Message-id: 20180703023758.14422-2-famz@redhat.com
Reviewed-by: default avatarJeff Cody <jcody@redhat.com>
Signed-off-by: default avatarJeff Cody <jcody@redhat.com>
parent ab08440a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment