examples/vhost: fix header copy to discontiguous desc buffer
In the loop to copy virtio-net header to the descriptor buffer,
destination pointer was incremented instead of the source
pointer.
Coverity issue: 277240
Fixes: 82c93a567d
("examples/vhost: move to safe GPA translation API")
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
bfbf0143d1
commit
55dfc375cf
|
@ -103,7 +103,7 @@ enqueue_pkt(struct vhost_dev *dev, struct rte_vhost_vring *vr,
|
|||
|
||||
remain -= len;
|
||||
guest_addr += len;
|
||||
dst += len;
|
||||
src += len;
|
||||
}
|
||||
|
||||
desc_chunck_len = desc->len - dev->hdr_len;
|
||||
|
|
Loading…
Reference in a new issue