kern: usbehcipc.c fix CID 155940: Out-of-bounds write

This commit is contained in:
Giacomo Tesio 2017-04-25 16:07:47 +02:00
parent 80a8501c05
commit ac33157c37
1 changed files with 2 additions and 1 deletions

View File

@ -209,7 +209,8 @@ scanpci(void)
if (i >= maxehci) {
iprint("usbehci: ignoring controllers after first %d, "
"at %#p\n", maxehci, io);
ctlrs[i] = nil;
if(i < Nhcis)
ctlrs[i] = nil;
}
}
}