Correct bounds check in lapic_create().

Submitted by:	"Ted Unangst" tedu at coverity.com
This commit is contained in:
John Baldwin 2004-07-14 18:12:15 +00:00
parent 09a23520c0
commit 0c9cb34441
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=132156

View File

@ -194,7 +194,7 @@ lapic_create(u_int apic_id, int boot_cpu)
{
int i;
if (apic_id > MAX_APICID) {
if (apic_id >= MAX_APICID) {
printf("APIC: Ignoring local APIC with ID %d\n", apic_id);
if (boot_cpu)
panic("Can't ignore BSP");