[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <66b96f4d69475c28f7a10794cc8bdccccf7a2f50.1413021630.git.tilman@imap.cc>
Date: Sat, 11 Oct 2014 13:46:29 +0200 (CEST)
From: Tilman Schmidt <tilman@...p.cc>
To: netdev@...r.kernel.org
Cc: David Miller <davem@...emloft.net>, Dave Jones <davej@...hat.com>,
Hansjoerg Lipp <hjlipp@....de>,
Karsten Keil <isdn@...ux-pingi.de>,
isdn4linux@...tserv.isdn4linux.de
Subject: [PATCH 04/12] 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@...p.cc>
---
drivers/isdn/gigaset/ev-layer.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index dcae14a..0f699eb 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:
--
1.9.2.459.g68773ac
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists