kernel: fix out of bound read in trap()

Reported by coverity, CID 155927: if vno == 32 it would access index
32 of excname at trap.c:339.
This commit is contained in:
Giacomo Tesio 2017-01-22 00:34:17 +01:00
parent 6dd0f2e130
commit c2b06ebf80
1 changed files with 1 additions and 1 deletions

View File

@ -332,7 +332,7 @@ trap(Ureg* ureg)
preempted();
}
}
else if(vno <= nelem(excname) && user){
else if(vno < nelem(excname) && user){
spllo();
if(vno == 0xd) /* General Protection */
dumpregs(ureg);