Change in ...osmocom-bb[master]: virtphy: Handle strtok() returning NULL on first call

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 21 11:00:21 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmocom-bb/+/14856 )

Change subject: virtphy: Handle strtok() returning NULL on first call
......................................................................

virtphy: Handle strtok() returning NULL on first call

Change-Id: I37bfb91cf75982bfa2f75bd62d0c13859268cd93
Closes: CID#198565
---
M src/host/virt_phy/src/virtphy.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/host/virt_phy/src/virtphy.c b/src/host/virt_phy/src/virtphy.c
index 118e8a1..d0a2ddb 100644
--- a/src/host/virt_phy/src/virtphy.c
+++ b/src/host/virt_phy/src/virtphy.c
@@ -153,6 +153,8 @@
 		return;
 
 	char *token = strtok(arfcn_sig_lev_red_mask, ":");
+	if (!token)
+		return;
 	do {
 		char* colon = strstr(token, ",");
 		uint16_t arfcn;

-- 
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/14856
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I37bfb91cf75982bfa2f75bd62d0c13859268cd93
Gerrit-Change-Number: 14856
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190721/ba3887cc/attachment.htm>


More information about the gerrit-log mailing list