Overrun in cdrom/aztcd.c
PATCH 1/1 Overrun in cdrom/aztcd.c
hi,
this fixes coverity bug id #473.
After the for loop i==16 if we dont find a cdrom. So we should check for i==16 first before checking the array element.
Signed-off-by Eric Sesterhenn <[email protected]>
drivers/cdrom/aztcd.c renamed from drivers/cdrom/aztcd.c.orig +1 -1
@@ -1763,7 +1763,7 @@ static int __init aztcd_init(void)release_region (azt_port,4 ); } } -if ((azt_port_auto[i] ==0 ) || (i ==16 )) { +if ((i ==16 ) || (azt_port_auto[i] ==0 )) {printk (KERN_INFO "aztcd: no AZTECH CD-ROM drive found\n" );return -EIO ; }