summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-07-21 09:04:16 +0200
committerHarald Welte <laforge@gnumonks.org>2019-07-21 09:04:16 +0200
commitcfd28d5e29c29019e91c734d770c0c0c0f83574f (patch)
tree462ce8e9f754bc9f402e5565674f8d353de846fb
parentcb587bb29ece8c7bffcd9e63e46920efc59a51b6 (diff)
virtphy: Handle strtok() returning NULL on first call
Change-Id: I37bfb91cf75982bfa2f75bd62d0c13859268cd93 Closes: CID#198565
-rw-r--r--src/host/virt_phy/src/virtphy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/host/virt_phy/src/virtphy.c b/src/host/virt_phy/src/virtphy.c
index 118e8a10..d0a2ddbf 100644
--- a/src/host/virt_phy/src/virtphy.c
+++ b/src/host/virt_phy/src/virtphy.c
@@ -153,6 +153,8 @@ void parse_arfcn_sig_lev_red(struct l1_model_ms *model, char * arfcn_sig_lev_red
return;
char *token = strtok(arfcn_sig_lev_red_mask, ":");
+ if (!token)
+ return;
do {
char* colon = strstr(token, ",");
uint16_t arfcn;