aboutsummaryrefslogtreecommitdiffstats
path: root/src/libvlr/vlr_access_req_fsm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libvlr/vlr_access_req_fsm.c')
-rw-r--r--src/libvlr/vlr_access_req_fsm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libvlr/vlr_access_req_fsm.c b/src/libvlr/vlr_access_req_fsm.c
index 79eb75f85..3a0760d84 100644
--- a/src/libvlr/vlr_access_req_fsm.c
+++ b/src/libvlr/vlr_access_req_fsm.c
@@ -676,8 +676,7 @@ vlr_proc_acc_req(struct osmo_fsm_inst *parent,
mi_type = mi_lv[1] & GSM_MI_TYPE_MASK;
switch (mi_type) {
case GSM_MI_TYPE_IMSI:
- strncpy(par->imsi, mi_string, sizeof(par->imsi)-1);
- par->imsi[sizeof(par->imsi)-1] = '\0';
+ osmo_strlcpy(par->imsi, mi_string, sizeof(par->imsi));
par->by_tmsi = false;
break;
case GSM_MI_TYPE_TMSI: