[S] Change in osmocom-bb[master]: Use OSMO_STRLCPY_ARRAY instead of strcpy
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/32743 ) Change subject: Use OSMO_STRLCPY_ARRAY instead of strcpy ...................................................................... Use OSMO_STRLCPY_ARRAY instead of strcpy Change-Id: I6b9bfffd715c4238289b693740585ec08f8d8d16 --- M src/host/layer23/src/common/settings.c M src/host/layer23/src/common/subscriber.c 2 files changed, 11 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/host/layer23/src/common/settings.c b/src/host/layer23/src/common/settings.c index 986d551..01a99a9 100644 --- a/src/host/layer23/src/common/settings.c +++ b/src/host/layer23/src/common/settings.c @@ -67,7 +67,7 @@ set->sim_type = GSM_SIM_TYPE_L1PHY; /* test SIM */ - strcpy(set->test_imsi, "001010000000000"); + OSMO_STRLCPY_ARRAY(set->test_imsi, "001010000000000"); set->test_rplmn_mcc = set->test_rplmn_mnc = 1; set->test_lac = 0x0000; set->test_tmsi = GSM_RESERVED_TMSI; diff --git a/src/host/layer23/src/common/subscriber.c b/src/host/layer23/src/common/subscriber.c index 4fdb4d6..84d08e1 100644 --- a/src/host/layer23/src/common/subscriber.c +++ b/src/host/layer23/src/common/subscriber.c @@ -177,7 +177,7 @@ subscr->ptmsi = GSM_RESERVED_TMSI; subscr->always_search_hplmn = set->test_always; subscr->t6m_hplmn = 1; /* try to find home network every 6 min */ - strcpy(subscr->imsi, set->test_imsi); + OSMO_STRLCPY_ARRAY(subscr->imsi, set->test_imsi); LOGP(DMM, LOGL_INFO, "(ms %s) Inserting test card (IMSI=%s %s, %s)\n", ms->name, subscr->imsi, gsm_imsi_mcc(subscr->imsi), -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/32743 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I6b9bfffd715c4238289b693740585ec08f8d8d16 Gerrit-Change-Number: 32743 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin