mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
isdn: off by one in connect_res()
The bug here is that we use "Reject" as the index into the cau_t[] array in the else path. Since the cau_t[] has 9 elements if Reject == 9 then we are reading beyond the end of the array. My understanding of the code is that it's saying that if Reject is 1 or too high then that's invalid and we should hang up. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
1 parent
3ae55826ae
commit
c101cff901
1 file changed
+1
-1
@@ -1474,7 +1474,7 @@ static byte connect_res(dword Id, word Number, DIVA_CAPI_ADAPTER *a,
|
||||
add_ai(plci, &parms[5]);
|
||||
sig_req(plci, REJECT, 0);
|
||||
}
|
||||
else if (Reject == 1 || Reject > 9)
|
||||
else if (Reject == 1 || Reject >= 9)
|
||||
{
|
||||
add_ai(plci, &parms[5]);
|
||||
sig_req(plci, HANGUP, 0);
|
||||
|
||||
Reference in new issue
Block a user