Browse Source

Must not go beyond end of driver's probe list.

tags/v0.9.3
Michael Brown 20 years ago
parent
commit
feb652709d
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/drivers/bus/isa.c

+ 4
- 1
src/drivers/bus/isa.c View File

100
 	/* If ioaddr is zero, it means we're using a driver-specified
100
 	/* If ioaddr is zero, it means we're using a driver-specified
101
 	 * ioaddr
101
 	 * ioaddr
102
 	 */
102
 	 */
103
-	if ( ! isa->ioaddr )
103
+	if ( ! isa->ioaddr ) {
104
+		if ( isa->driver_probe_idx >= driver->addr_count )
105
+			return 0;
104
 		isa->ioaddr = driver->probe_addrs[isa->driver_probe_idx];
106
 		isa->ioaddr = driver->probe_addrs[isa->driver_probe_idx];
107
+	}
105
 
108
 
106
 	/* Use probe_addr method to see if there's a device
109
 	/* Use probe_addr method to see if there's a device
107
 	 * present at this address.
110
 	 * present at this address.

Loading…
Cancel
Save