summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 15:03:02 +0100
committerHarald Welte <laforge@gnumonks.org>2016-12-09 15:35:31 +0000
commit4a7d0e79ccb9f12ace9f2ff24afbe80a63c88b84 (patch)
tree1673b4f34d845f42eba23f16242bcb38d23e9a51
parent2327cede9cd205ef8d2e0fef59857599024838c8 (diff)
mgcp_protocol: Ensure we don't call strtok_r with NULL data
Change-Id: I1dce4df6a49fe95db592b0598194e3a8b8b1b994 Fixes: Coverity CID 135181
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 2e728cb75..18398fc59 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -447,6 +447,7 @@ static int mgcp_analyze_header(struct mgcp_parse_data *pdata, char *data)
int i = 0;
char *elem, *save = NULL;
+ OSMO_ASSERT(data);
pdata->trans = "000000";
for (elem = strtok_r(data, " ", &save); elem;