From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: "David S. Miller" <davem@davemloft.net>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: [PATCH 2.6 IrDA] Fix nsc-ircc dongle_id input
Date: Tue, 19 Oct 2004 18:02:27 -0700 [thread overview]
Message-ID: <20041020010227.GC12932@bougret.hpl.hp.com> (raw)
ir269_nsc_dongle-2.diff :
~~~~~~~~~~~~~~~~~~~~~~~
<Original patch from Maik Broemme>
o [CRITICA] Don't Oops on invalid dongle-id in nsc-ircc driver
Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com>
diff -u -p linux/drivers/net/irda/nsc-ircc.d0.c linux/drivers/net/irda/nsc-ircc.c
--- linux/drivers/net/irda/nsc-ircc.d0.c Fri Oct 15 15:30:40 2004
+++ linux/drivers/net/irda/nsc-ircc.c Fri Oct 15 15:32:20 2004
@@ -351,8 +351,9 @@ static int __init nsc_ircc_open(int i, c
}
MESSAGE("IrDA: Registered device %s\n", dev->name);
- /* Check if user has supplied the dongle id or not */
- if (!dongle_id) {
+ /* Check if user has supplied a valid dongle id or not */
+ if ((dongle_id <= 0) ||
+ (dongle_id >= (sizeof(dongle_types) / sizeof(dongle_types[0]))) ) {
dongle_id = nsc_ircc_read_dongle_id(self->io.fir_base);
MESSAGE("%s, Found dongle: %s\n", driver_name,
reply other threads:[~2004-10-20 1:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041020010227.GC12932@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=davem@davemloft.net \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.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 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®