diff options
author | Anton Vasilyev <vasilyev@ispras.ru> | 2017-08-11 14:57:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-11 23:56:23 +0200 |
commit | 54a6a043fb8580d5a741774669ef6049f402f228 (patch) | |
tree | 9632f50edc83f47ea18ef6011af1cafec141dc8b /drivers/isdn/mISDN/fsm.h | |
parent | nfp: do not update MTU from BH in flower app (diff) | |
download | linux-54a6a043fb8580d5a741774669ef6049f402f228.tar.xz linux-54a6a043fb8580d5a741774669ef6049f402f228.zip |
mISDN: Fix null pointer dereference at mISDN_FsmNew
If mISDN_FsmNew() fails to allocate memory for jumpmatrix
then null pointer dereference will occur on any write to
jumpmatrix.
The patch adds check on successful allocation and
corresponding error handling.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/mISDN/fsm.h')
-rw-r--r-- | drivers/isdn/mISDN/fsm.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/mISDN/fsm.h b/drivers/isdn/mISDN/fsm.h index 928f5be192c1..e1def8490221 100644 --- a/drivers/isdn/mISDN/fsm.h +++ b/drivers/isdn/mISDN/fsm.h @@ -55,7 +55,7 @@ struct FsmTimer { void *arg; }; -extern void mISDN_FsmNew(struct Fsm *, struct FsmNode *, int); +extern int mISDN_FsmNew(struct Fsm *, struct FsmNode *, int); extern void mISDN_FsmFree(struct Fsm *); extern int mISDN_FsmEvent(struct FsmInst *, int , void *); extern void mISDN_FsmChangeState(struct FsmInst *, int); |