From 1a34456bbbdaa939ffa567d15a0797c269f901b7 Mon Sep 17 00:00:00 2001 From: Eric Sesterhenn Date: Tue, 18 Apr 2006 21:09:20 -0700 Subject: [PATCH] [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 Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/sim710.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c index 3274ab7..255886a 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; -- 1.8.2.3