From: Tilman Schmidt Date: Sat, 11 Oct 2014 11:46:29 +0000 (+0200) Subject: isdn/gigaset: fix NULL pointer dereference X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=846ac30135e7c5e03b487c16c87ccb1ab020a01f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: David S. Miller --- 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: