From: Andreas Henriksson <andreas@fjortis.info>
To: "Randy\.Dunlap" <rddunlap@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] 87 potential array bounds error/buffer overruns in 2.5.53
Date: Thu, 30 Jan 2003 21:08:41 +0100 [thread overview]
Message-ID: <20030130200841.GA26758@foo> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0301301102575.4084-100000@dragon.pdx.osdl.net>
>
> These (potential) reported errors are unfixed:
...
> 1 | /sound/sb_card.c
...
The original message said:
---------------------------------------------------------
[BUG] what if the for loop above ends with i = 0?
/home/yxie/linux-2.5.53/sound/oss/sb_card.c:890:sb_isapnp_probe:
ERROR:BUFFER:890:890:Array bounds error (off < 0) (sb_isapnp_list[i],
max(off) = -1)
}
if(!first || !reverse)
i = isapnpjump;
first = 0;
Error --->
while(sb_isapnp_list[i].card_vendor != 0) {
static struct pci_bus *bus = NULL;
while ((bus = isapnp_find_card(
---------------------------------------------------------
(Hopefully) Relevant loop:
/* Count entries in sb_isapnp_list */
for (i = 0; sb_isapnp_list[i].card_vendor != 0; i++);
i--;
The loop will never end with i=0 unless the card list is
empty. And what use would a driver with an empty card list be? (so that
will never happen. Maybee the checker won't trigger if the cardlist is
marked as "const"? I vote for this to be marked as a non-bug, but
someone else should probably check it too.)
-- Andreas Henriksson
next prev parent reply other threads:[~2003-01-30 20:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-27 1:35 [CHECKER] 87 potential array bounds error/buffer overruns in 2.5.53 Yichen Xie
2003-01-28 7:39 ` Randy.Dunlap
2003-01-28 9:21 ` Yichen Xie
2003-01-28 17:14 ` Randy.Dunlap
2003-01-28 13:16 ` Stephen Lord
2003-01-30 19:03 ` Randy.Dunlap
2003-01-30 20:08 ` Andreas Henriksson [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-01-28 18:28 David Brownell
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=20030130200841.GA26758@foo \
--to=andreas@fjortis.info \
--cc=linux-kernel@vger.kernel.org \
--cc=rddunlap@osdl.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.