Re: [Qemu-devel] [PATCH] lm4549: Fix buffer overflow

2012-09-22 Thread Stefan Hajnoczi
On Sat, Sep 01, 2012 at 12:43:41PM +0200, Stefan Weil wrote: > Report from smatch: > lm4549.c:234 lm4549_write_samples(14) error: > buffer overflow 's->buffer' 1024 <= 1024 > > There must be enough space to add two entries starting with index > s->buffer_level, therefore the old check was wrong.

Re: [Qemu-devel] [PATCH] lm4549: Fix buffer overflow

2012-09-01 Thread Peter Maydell
On 1 September 2012 11:43, Stefan Weil wrote: > Report from smatch: > lm4549.c:234 lm4549_write_samples(14) error: > buffer overflow 's->buffer' 1024 <= 1024 > > There must be enough space to add two entries starting with index > s->buffer_level, therefore the old check was wrong. > > Signed-off-

[Qemu-devel] [PATCH] lm4549: Fix buffer overflow

2012-09-01 Thread Stefan Weil
Report from smatch: lm4549.c:234 lm4549_write_samples(14) error: buffer overflow 's->buffer' 1024 <= 1024 There must be enough space to add two entries starting with index s->buffer_level, therefore the old check was wrong. Signed-off-by: Stefan Weil --- hw/lm4549.c |2 +- 1 file changed,