提交 edc98144 编写于 作者: Y Yang Hongyang 提交者: Jason Wang

net: make iov_to_buf take right size argument in nc_sendv_compat()

We want "buf, sizeof(buf)" here.  sizeof(buffer) is the size of a
pointer, which is wrong.
Thanks to Paolo for pointing it out.
Signed-off-by: NYang Hongyang <yanghy@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NJason Wang <jasowang@redhat.com>
上级 5320c2ca
......@@ -708,7 +708,7 @@ static ssize_t nc_sendv_compat(NetClientState *nc, const struct iovec *iov,
offset = iov[0].iov_len;
} else {
buffer = buf;
offset = iov_to_buf(iov, iovcnt, 0, buffer, sizeof(buffer));
offset = iov_to_buf(iov, iovcnt, 0, buf, sizeof(buf));
}
if (flags & QEMU_NET_PACKET_FLAG_RAW && nc->info->receive_raw) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册