All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] net: fix incorrect argument to iov_to_buf
Date: Mon, 18 Jul 2016 13:58:45 +0800	[thread overview]
Message-ID: <578C7015.4070902@redhat.com> (raw)
In-Reply-To: <1468572107-23977-1-git-send-email-pbonzini@redhat.com>



On 2016年07月15日 16:41, Paolo Bonzini wrote:
> Coverity reports a "suspicious sizeof" which is indeed wrong.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   net/eth.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/eth.c b/net/eth.c
> index 95fe15c..0be59c2 100644
> --- a/net/eth.c
> +++ b/net/eth.c
> @@ -418,7 +418,7 @@ _eth_get_rss_ex_dst_addr(const struct iovec *pkt, int pkt_frags,
>   
>           bytes_read = iov_to_buf(pkt, pkt_frags,
>                                   rthdr_offset + sizeof(*ext_hdr),
> -                                dst_addr, sizeof(dst_addr));
> +                                dst_addr, sizeof(*dst_addr));
>   
>           return bytes_read == sizeof(dst_addr);
>       }
> @@ -467,7 +467,7 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags,
>   
>               bytes_read = iov_to_buf(pkt, pkt_frags,
>                                       opt_offset + sizeof(opthdr),
> -                                    src_addr, sizeof(src_addr));
> +                                    src_addr, sizeof(*src_addr));
>   
>               return bytes_read == sizeof(src_addr);
>           }

Applied to -net. Thanks

      reply	other threads:[~2016-07-18  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15  8:41 [Qemu-devel] [PATCH] net: fix incorrect argument to iov_to_buf Paolo Bonzini
2016-07-18  5:58 ` Jason Wang [this message]

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=578C7015.4070902@redhat.com \
    --to=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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.