* [Patch] Overrun in drivers/input/joystick/db9.c
@ 2006-06-27 22:16 Eric Sesterhenn
2006-06-28 3:43 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-06-27 22:16 UTC (permalink / raw)
To: linux-kernel; +Cc: dmitry.torokhov
hi,
coverity spotted this overrun (#id 483), we assign
db9_mode = &db9_modes[mode]; some lines before, so
if we use mode as index again we might get past the
array once mode is greater than DB9_MAX_PAD/2,
besides this this patch changes the code to what
the author possibly intended it to do.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.17-git11/drivers/input/joystick/db9.c.orig 2006-06-28 00:06:47.000000000 +0200
+++ linux-2.6.17-git11/drivers/input/joystick/db9.c 2006-06-28 00:08:32.000000000 +0200
@@ -584,7 +584,7 @@ static struct db9 __init *db9_probe(int
goto err_out;
}
- if (db9_mode[mode].bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
+ if (db9_mode->bidirectional && !(pp->modes & PARPORT_MODE_TRISTATE)) {
printk(KERN_ERR "db9.c: specified parport is not bidirectional\n");
err = -EINVAL;
goto err_put_pp;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch] Overrun in drivers/input/joystick/db9.c
2006-06-27 22:16 [Patch] Overrun in drivers/input/joystick/db9.c Eric Sesterhenn
@ 2006-06-28 3:43 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2006-06-28 3:43 UTC (permalink / raw)
To: Eric Sesterhenn; +Cc: linux-kernel, dmitry.torokhov
On Tuesday 27 June 2006 18:16, Eric Sesterhenn wrote:
> hi,
>
> coverity spotted this overrun (#id 483), we assign
> db9_mode = &db9_modes[mode]; some lines before, so
> if we use mode as index again we might get past the
> array once mode is greater than DB9_MAX_PAD/2,
> besides this this patch changes the code to what
> the author possibly intended it to do.
>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-28 3:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-27 22:16 [Patch] Overrun in drivers/input/joystick/db9.c Eric Sesterhenn
2006-06-28 3:43 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox