diff options
author | Tilman Schmidt <tilman@imap.cc> | 2014-10-11 13:46:29 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-14 15:05:33 -0400 |
commit | 846ac30135e7c5e03b487c16c87ccb1ab020a01f (patch) | |
tree | d05a50ab4e0fadc1d119656b68c9cff0cbc307f4 /drivers/isdn/gigaset | |
parent | 097933ddcd28ef99c116651b20fd2e06717e0f0d (diff) |
isdn/gigaset: fix NULL pointer dereference
In do_action, a NULL pointer might be passed to function start_dial
which will dereference it.
Fix by adding a check for NULL before the call.
Spotted with Coverity.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index dcae14aef376..0f699ebd81c5 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c @@ -1380,6 +1380,11 @@ static void do_action(int action, struct cardstate *cs, /* events from the LL */ case ACT_DIAL: + if (!ev->ptr) { + *p_genresp = 1; + *p_resp_code = RSP_ERROR; + break; + } start_dial(at_state, ev->ptr, ev->parameter); break; case ACT_ACCEPT: |