Skip to content

Commit

Permalink
mISDN: Read buffer overflow
Browse files Browse the repository at this point in the history
Check whether index is within bounds before testing the element.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
roel kluin authored and David S. Miller committed Aug 2, 2009
1 parent 54706d9 commit 9bfdac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/isdn/mISDN/l1oip_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ l1oip_init(void)
return -ENOMEM;

l1oip_cnt = 0;
while (type[l1oip_cnt] && l1oip_cnt < MAX_CARDS) {
while (l1oip_cnt < MAX_CARDS && type[l1oip_cnt]) {
switch (type[l1oip_cnt] & 0xff) {
case 1:
pri = 0;
Expand Down

0 comments on commit 9bfdac9

Please sign in to comment.