summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-26 15:03:02 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-26 17:10:29 +0100
commit84562fe6a85a289d177f94e1539e80943b23f33f (patch)
treeb285718845d3d7789087d85668008731efddc3dc
parent2fd99175f8e45edb5c0f5959f3d054743dc786f6 (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;