Use OSMO_STRLCPY_ARRAY instead of strcpy
Change-Id: I6b9bfffd715c4238289b693740585ec08f8d8d16
This commit is contained in:
parent
1897218be4
commit
1a720cd176
|
@ -67,7 +67,7 @@ int gsm_settings_init(struct osmocom_ms *ms)
|
|||
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;
|
||||
|
|
|
@ -177,7 +177,7 @@ int gsm_subscr_testcard(struct osmocom_ms *ms, uint16_t mcc, uint16_t mnc,
|
|||
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),
|
||||
|
|
Loading…
Reference in New Issue