aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/aztcd.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-04-11 01:54:37 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-11 09:18:46 -0400
commitd93c2efc93f61c95808e303982f12fe6f5987270 (patch)
treedfb81b98ad65e8b1b27a8ed1d32e545cd4c0e8c2 /drivers/cdrom/aztcd.c
parente60b6e2f747e94358fed9a23afd6abd738de4bf7 (diff)
[PATCH] Overrun in cdrom/aztcd.c
This fixes coverity bug id #473. After the for loop i==16 if we didn't find a cdrom. So we should check for i==16 first before checking the array element. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Cc: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom/aztcd.c')
-rw-r--r--drivers/cdrom/aztcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cdrom/aztcd.c b/drivers/cdrom/aztcd.c
index ce4a1ce59d6a..ec004897b634 100644
--- a/drivers/cdrom/aztcd.c
+++ b/drivers/cdrom/aztcd.c
@@ -1763,7 +1763,7 @@ static int __init aztcd_init(void)
1763 release_region(azt_port, 4); 1763 release_region(azt_port, 4);
1764 } 1764 }
1765 } 1765 }
1766 if ((azt_port_auto[i] == 0) || (i == 16)) { 1766 if ((i == 16) || (azt_port_auto[i] == 0)) {
1767 printk(KERN_INFO "aztcd: no AZTECH CD-ROM drive found\n"); 1767 printk(KERN_INFO "aztcd: no AZTECH CD-ROM drive found\n");
1768 return -EIO; 1768 return -EIO;
1769 } 1769 }