qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] net: cadence_gem: check packet size in gem_reci


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH] net: cadence_gem: check packet size in gem_recieve
Date: Mon, 18 Jan 2016 14:49:03 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1


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 via email to

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