From: Eugene Teo <eugene.teo@eugeneteo.net>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fix ali5451 dereferenced before NULL check
Date: Thu, 16 Mar 2006 19:48:40 +0800 [thread overview]
Message-ID: <20060316114840.GA24356@eugeneteo.net> (raw)
In-Reply-To: <s5hbqw6r6jb.wl%tiwai@suse.de>
Hi Takashi-san,
<quote sender="Takashi Iwai">
> At Thu, 16 Mar 2006 09:36:02 +0800,
> Eugene Teo wrote:
> >
> > pvoice is missing a NULL check. channel needs a bound check too.
>
> Both checks are not necessary. There is a single caller to this
> function, and the channel argument is a loop value of
All right.
> for (channel = 0; channel < ALI_CHANNELS; channel++)
> snd_ali_update_ptr(codec, channel);
>
> pvoice is the address pointing a part of a structure, so it cannot be
> NULL anyway. If a check were needed, it should be if (codec != NULL).
A check for codec is unnecessary. snd_ali_card_interrupt() is the only
caller for snd_ali_interrupt() and it checks codec for NULL before it
calls the function to perform the above for loop.
Thanks.
Eugene
--
1024D/A6D12F80 print D51D 2633 8DAC 04DB 7265 9BB8 5883 6DAA A6D1 2F80
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }
prev parent reply other threads:[~2006-03-16 11:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-16 1:36 Eugene Teo
2006-03-16 11:08 ` Takashi Iwai
2006-03-16 11:48 ` Eugene Teo [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=20060316114840.GA24356@eugeneteo.net \
--to=eugene.teo@eugeneteo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.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
all inboxes | Powered by JetHome®