qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat()
@ 2015-10-20  1:51 Yang Hongyang
  2015-10-20  1:51 ` [Qemu-devel] [PATCH 2/2] net: free the string returned by object_get_canonical_path_component Yang Hongyang
  2015-10-20  7:20 ` [Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat() Jason Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Yang Hongyang @ 2015-10-20  1:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Jason Wang, Yang Hongyang

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 <yanghy@cn.fujitsu.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
---
 net/net.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/net.c b/net/net.c
index 39af893..0c4a012 100644
--- a/net/net.c
+++ b/net/net.c
@@ -700,7 +700,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) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-20  8:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20  1:51 [Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat() Yang Hongyang
2015-10-20  1:51 ` [Qemu-devel] [PATCH 2/2] net: free the string returned by object_get_canonical_path_component Yang Hongyang
2015-10-20  7:20 ` [Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat() Jason Wang
2015-10-20  8:06   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).