Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DAOS-16251 object: Fix obj_ec_singv_split overflow (#15045)
It has been seen that obj_ec_singv_split may read beyond the end of sgl->sg_iovs[0].iov_buf: iod_size=8569 c_bytes=4288 id_shard=0 tgt_off=1 iov_len=8569 iov_buf_len=8569 The memmove read 4288 bytes from offset 4288, whereas the buffer only had 8569 - 4288 = 4281 bytes from offset 4288. This patch fixes the problem by adding the min(...) expression. Signed-off-by: Li Wei <[email protected]>
- Loading branch information