forked from KolibriOS/kolibrios
changes to attach_int_handler:
detect if int is not larger then 15 (you could probably crash the kernel otherwise) git-svn-id: svn://kolibrios.org@700 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
b66406549f
commit
7941c117bc
@ -16,12 +16,14 @@ DRV_VERSION equ (DRV_COMPAT shl 16) or DRV_CURRENT
|
||||
align 4
|
||||
proc attach_int_handler stdcall, irq:dword, handler:dword
|
||||
|
||||
mov ebx, [irq] ;irq num
|
||||
mov ebx, [irq] ; irq num
|
||||
test ebx, ebx
|
||||
jz .err
|
||||
mov eax, [handler]
|
||||
jz .err
|
||||
cmp ebx, 15 ; hidnplayr says: we only have 16 IRQ's
|
||||
jg .err
|
||||
mov eax, [handler]
|
||||
test eax, eax
|
||||
jz .err
|
||||
jz .err
|
||||
mov [irq_tab+ebx*4], eax
|
||||
stdcall enable_irq, [irq]
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user