All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Yang Hongyang <yanghy@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat()
Date: Tue, 20 Oct 2015 15:20:31 +0800	[thread overview]
Message-ID: <5625EB3F.2030605@redhat.com> (raw)
In-Reply-To: <1445305886-11901-1-git-send-email-yanghy@cn.fujitsu.com>



On 10/20/2015 09:51 AM, Yang Hongyang wrote:
> 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) {

Both two patches were applied in:

https://github.com/jasowang/qemu/commits/net

Thanks

  parent reply	other threads:[~2015-10-20  7:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Jason Wang [this message]
2015-10-20  8:06   ` [Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat() Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5625EB3F.2030605@redhat.com \
    --to=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yanghy@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.