qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/8] usb: fix unbounded stack for xhci_dma_write


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH 4/8] usb: fix unbounded stack for xhci_dma_write_u32s
Date: Thu, 10 Mar 2016 10:07:26 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Mar 09, 2016 at 01:59:03PM +0100, Paolo Bonzini wrote:
> If you look at users, they only write about 20 bytes at most.  My
> suggestion is to use your patch, and replace
> 
>     assert(__BUF_SIZE >= n);
> 
> with
> 
>     assert(n < ARRAY_SIZE(tmp));
> 
> Then you don't need the #define.

Okay. Will fix and post another one.

Thanks.
Peter



reply via email to

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