]> git.baikalelectronics.ru Git - kernel.git/commit
isdn/kcapi: fix a small underflow
authorDan Carpenter <dan.carpenter@oracle.com>
Sun, 19 May 2013 08:36:36 +0000 (08:36 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 May 2013 20:38:14 +0000 (13:38 -0700)
commitd5bd5ed5d8386de0f1eaf49eb8ba3e4321f269b7
tree2371e9c1dea647c690a2b01255d462656a8393ce
parent4de9286c28f0a9cc21934c39b43f2edcef3cc18e
isdn/kcapi: fix a small underflow

In get_capi_ctr_by_nr() and get_capi_appl_by_nr() the parameter comes
from skb->data.  The current code can underflow to one space before the
start of the array.

The sanity check isn't needed in __get_capi_appl_by_nr() but I changed
it to match the others.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/capi/kcapi.c