aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-11-08 16:58:23 +0100
committerAlexander Couzens <lynxis@fe80.eu>2016-11-08 17:06:59 +0100
commit96fb02476b88728ec92e24a1e21692479eda4a0b (patch)
tree6b4661c5e50a4c823edf8ef3ff5fa7b01ac61827
parent164e524c5357823bb4d3eb85186e3b6be0e0f35f (diff)
unixsocket/e1inp_ericsson_set_altc: do more validation checks on *line parameterlynxis/altcswitch
-rw-r--r--src/input/unixsocket.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/input/unixsocket.c b/src/input/unixsocket.c
index 0b5b53a..144359b 100644
--- a/src/input/unixsocket.c
+++ b/src/input/unixsocket.c
@@ -217,19 +217,24 @@ void e1inp_unixsocket_init(void)
void e1inp_ericsson_set_altc(struct e1inp_line *unixline, int superchannel)
{
- struct unixsocket_line *config = unixline->driver_data;
+ struct unixsocket_line *config;
struct msgb *msg;
+ if (!unixline)
+ return;
+
if (unixline->driver != &unixsocket_driver) {
LOGP(DLMI, LOGL_NOTICE, "altc is only supported by unixsocket\n");
return;
}
+ config = unixline->driver_data;
if (!config) {
LOGP(DLMI, LOGL_NOTICE, "e1inp driver not yet initialized.\n");
return;
}
+
msg = msgb_alloc_headroom(200, 100, "ALTTC");
/* magic */