mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
gigaset: correct range checking off by one error
Correct a potential array overrun due to an off by one error in the range check on the CAPI CONNECT_REQ CIPValue parameter. Found and reported by Dan Carpenter using smatch. Impact: bugfix Signed-off-by: Tilman Schmidt <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
7f7708f005
commit
6ad34145cf
1 changed files with 1 additions and 1 deletions
|
|
@ -1301,7 +1301,7 @@ static void do_connect_req(struct gigaset_capi_ctr *iif,
|
|||
}
|
||||
|
||||
/* check parameter: CIP Value */
|
||||
if (cmsg->CIPValue > ARRAY_SIZE(cip2bchlc) ||
|
||||
if (cmsg->CIPValue >= ARRAY_SIZE(cip2bchlc) ||
|
||||
(cmsg->CIPValue > 0 && cip2bchlc[cmsg->CIPValue].bc == NULL)) {
|
||||
dev_notice(cs->dev, "%s: unknown CIP value %d\n",
|
||||
"CONNECT_REQ", cmsg->CIPValue);
|
||||
|
|
|
|||
Loading…
Reference in a new issue