[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [Qemu-devel] [PATCH] lm4549: Fix buffer overflow
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-trivial] [Qemu-devel] [PATCH] lm4549: Fix buffer overflow |
Date: |
Sat, 22 Sep 2012 16:36:05 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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.
>
> Signed-off-by: Stefan Weil <address@hidden>
> ---
> hw/lm4549.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches
I've added Peter's comment to the commit message that the overflow
condition doesn't actually happen since we advance by two at a time.
Stefan