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:
hidnplayr 2008-01-20 20:51:24 +00:00
parent b66406549f
commit 7941c117bc

View File

@ -16,9 +16,11 @@ 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
cmp ebx, 15 ; hidnplayr says: we only have 16 IRQ's
jg .err
mov eax, [handler]
test eax, eax
jz .err