]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: add a bounds check in link_recv_changeover_msg()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 6 May 2013 08:28:41 +0000 (08:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 May 2013 20:16:52 +0000 (16:16 -0400)
commit2040308bb0c9d2b9a9cc49ad6ab33398267690b3
treecedc736240969480891ff4bb5de7b32d8b448e42
parent08109921e1e98e81f9c2d0714a4b076397f4b939
tipc: add a bounds check in link_recv_changeover_msg()

The bearer_id here comes from skb->data and it can be a number from 0 to
7.  The problem is that the ->links[] array has only 2 elements so I
have added a range check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c