summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sim710.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-18 21:09:20 -0700
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-04-19 20:51:38 -0400
commit1a34456bbbdaa939ffa567d15a0797c269f901b7 (patch)
tree6e9aae933bc008c661aa5de29d17862d59037bce /drivers/scsi/sim710.c
parent36ab26185c0b6060203829bce32eaeab0fa781ae (diff)
[SCSI] Overrun in drivers/scsi/sim710.c
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> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/sim710.c')
-rw-r--r--drivers/scsi/sim710.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index 3274ab76c8d..255886a9ac5 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -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;