aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-08 18:30:22 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-20 00:21:01 +0000
commitca06e040cc115689fb10394cc566052576a638fc (patch)
tree279e0d62ccc46e9183228f82db8b13c9d077b948 /openbsc/src/gprs
parentac27a99021d404f9a15b952fbbc03789926b7ecc (diff)
bsc_/gprs_subscriber: fix: use osmo_strlcpy() to safely copy IMSI
Fixes: coverity scan CID 163918 Change-Id: I4b2760b006a0707928530b4390c6997b79b02981
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r--openbsc/src/gprs/gprs_subscriber.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c
index 2042ec6eb..1bb51418a 100644
--- a/openbsc/src/gprs/gprs_subscriber.c
+++ b/openbsc/src/gprs/gprs_subscriber.c
@@ -157,7 +157,7 @@ struct gprs_subscr *gprs_subscr_get_or_create(const char *imsi)
gsub = gprs_subscr_alloc();
if (!gsub)
return NULL;
- strncpy(gsub->imsi, imsi, sizeof(gsub->imsi));
+ osmo_strlcpy(gsub->imsi, imsi, sizeof(gsub->imsi));
}
if (!gsub->sgsn_data)