qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 09/10] net: make iov_to_buf take right size argument


From: Jason Wang
Subject: [Qemu-devel] [PULL 09/10] net: make iov_to_buf take right size argument in nc_sendv_compat()
Date: Tue, 27 Oct 2015 14:08:43 +0800

From: Yang Hongyang <address@hidden>

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: Yang Hongyang <address@hidden>
Cc: Jason Wang <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
 net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index 70a3576..2f2b39e 100644
--- a/net/net.c
+++ b/net/net.c
@@ -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) {
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]