qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] ide: Fix error messages from static code analysis (no real error)
Date: Tue, 04 Sep 2012 13:00:14 +0200	[thread overview]
Message-ID: <5045DF3E.9000808@redhat.com> (raw)
In-Reply-To: <1346703236-4280-1-git-send-email-sw@weilnetz.de>

Am 03.09.2012 22:13, schrieb Stefan Weil:
> Report from smatch:
> hw/ide/core.c:1472 ide_exec_cmd(423) error: buffer overflow 'smart_attributes' 8 <= 29
> hw/ide/core.c:1474 ide_exec_cmd(425) error: buffer overflow 'smart_attributes' 8 <= 29
> hw/ide/core.c:1475 ide_exec_cmd(426) error: buffer overflow 'smart_attributes' 8 <= 29
> ...
> 
> The upper limit of 30 was never reached because both for loops terminated
> when 'smart_attributes' reached end of list, so there was no real buffer
> overflow.
> 
> Nevertheless, changing the code not only fixes the error report, but also
> reduces the size of smart_attributes and simplifies the for loops.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> 
> Note: scripts/checkpatch.pl reports warnings and errors caused by tabs and
> wrong indentation. I did not fix that because the whole file is full of tabs.
> 
> - sw

Thanks, applied to block-next.

Kevin

      reply	other threads:[~2012-09-04 11:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-03 20:13 [Qemu-devel] [PATCH] ide: Fix error messages from static code analysis (no real error) Stefan Weil
2012-09-04 11:00 ` Kevin Wolf [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=5045DF3E.9000808@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@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).