aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sim710.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-19 00:09:20 -0400
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 3274ab76c8d3..255886a9ac55 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -75,7 +75,7 @@ param_setup(char *str)
75 else if(!strncmp(pos, "id:", 3)) { 75 else if(!strncmp(pos, "id:", 3)) {
76 if(slot == -1) { 76 if(slot == -1) {
77 printk(KERN_WARNING "sim710: Must specify slot for id parameter\n"); 77 printk(KERN_WARNING "sim710: Must specify slot for id parameter\n");
78 } else if(slot > MAX_SLOTS) { 78 } else if(slot >= MAX_SLOTS) {
79 printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val); 79 printk(KERN_WARNING "sim710: Illegal slot %d for id %d\n", slot, val);
80 } else { 80 } else {
81 id_array[slot] = val; 81 id_array[slot] = val;