summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 15:00:08 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 17:10:29 +0100
commit2fd99175f8e45edb5c0f5959f3d054743dc786f6 (patch)
treea66e2224c934682b1afe35fcbde9b6d18e4603a0
parent7da7d468b5624f5862c9abd63babfb64f077f9ca (diff)
bsc_ctrl: Ensure we don't pass NULL string into strtok_r()
Change-Id: I03bea132377c0136b55b6fdad99a5d92da12e692 Fixes: Coverity CID 135180
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_ctrl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
index 3010b5591..78647d3eb 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_ctrl.c
@@ -612,6 +612,7 @@ static int verify_net_ussd_notify(struct ctrl_cmd *cmd, const char *value, void
char *saveptr = NULL;
char *inp, *cic, *alert, *text;
+ OSMO_ASSERT(cmd);
inp = talloc_strdup(cmd, value);
cic = strtok_r(inp, ",", &saveptr);