From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org,
Mathieu Sonet <contact@elasticsheep.com>
Subject: Re: [Qemu-devel] [PATCH] lm4549: Fix buffer overflow
Date: Sat, 22 Sep 2012 16:36:05 +0100 [thread overview]
Message-ID: <20120922153605.GD13216@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <1346496221-11188-1-git-send-email-sw@weilnetz.de>
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 <sw@weilnetz.de>
> ---
> 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
prev parent reply other threads:[~2012-09-22 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-01 10:43 [Qemu-devel] [PATCH] lm4549: Fix buffer overflow Stefan Weil
2012-09-01 11:42 ` Peter Maydell
2012-09-22 15:36 ` Stefan Hajnoczi [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=20120922153605.GD13216@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=contact@elasticsheep.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=sw@weilnetz.de \
/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).