mgcp_protocol: Ensure we don't call strtok_r with NULL data

Change-Id: I1dce4df6a49fe95db592b0598194e3a8b8b1b994
Fixes: Coverity CID 135181
This commit is contained in:
Harald Welte 2016-11-26 15:03:02 +01:00
parent 2327cede9c
commit 4a7d0e79cc
1 changed files with 1 additions and 0 deletions

View File

@ -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;