* [Patch] Overrun in drivers/scsi/sim710.c
@ 2006-04-09 17:30 Eric Sesterhenn
0 siblings, 0 replies; only message in thread
From: Eric Sesterhenn @ 2006-04-09 17:30 UTC (permalink / raw)
To: LKML
hi,
this fixes coverity bug id #480.
Since id_array is declared as id_array[MAX_SLOTS],
the check for i>MAX_SLOTS is obviously false.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.17-rc1/drivers/scsi/sim710.c.orig 2006-04-09 19:25:13.000000000 +0200
+++ linux-2.6.17-rc1/drivers/scsi/sim710.c 2006-04-09 19:27:07.000000000 +0200
@@ -75,7 +75,7 @@ param_setup(char *str)
else if(!strncmp(pos, "id:", 3)) {
if(slot == -1) {
printk(KERN_WARNING "sim710: Must specify slot for id parameter\n");
- } else if(slot > MAX_SLOTS) {
+ } else if(slot >= MAX_SLOTS) {
printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val);
} else {
id_array[slot] = val;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-09 17:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09 17:30 [Patch] Overrun in drivers/scsi/sim710.c Eric Sesterhenn
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.