qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: P J P <ppandit@redhat.com>
Cc: qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Ling Liu <liuling-it@360.cn>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] net: cadence_gem: check packet size in gem_recieve
Date: Mon, 18 Jan 2016 14:49:03 +0800	[thread overview]
Message-ID: <569C8ADF.8050607@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1601181103130.30267@wniryva>



On 01/18/2016 01:34 PM, P J P wrote:
> +-- On Mon, 18 Jan 2016, Jason Wang wrote --+
> | > +        if (size > sizeof(rxbuf) - sizeof(crc_val)) {
> | > +            size = sizeof(rxbuf) - sizeof(crc_val);
> | > +        }
> | > +        bytes_to_copy = size;
> | > +
> | 
> | We probably need more check, is there any guarantee that size <= 2048?
> | If not, need fix.
>
>   Sorry? The above check would fix that, no?

You're right. Apply to my -net (and removing the unnecessary whitespace
change).

Thanks

> --
>  - P J P
> 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F

      reply	other threads:[~2016-01-18  6:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  7:00 [Qemu-devel] [PATCH] net: cadence_gem: check packet size in gem_recieve P J P
2016-01-18  2:57 ` Jason Wang
2016-01-18  5:34   ` P J P
2016-01-18  6:49     ` 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=569C8ADF.8050607@redhat.com \
    --to=jasowang@redhat.com \
    --cc=liuling-it@360.cn \
    --cc=mst@redhat.com \
    --cc=ppandit@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --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 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).