commit | 94a9362192f78751c6c8c4e294b61f9b38876a86 | [log] [tgz] |
---|---|---|
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | Wed Mar 08 18:30:22 2017 +0100 |
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | Mon Mar 20 00:21:01 2017 +0000 |
tree | 279e0d62ccc46e9183228f82db8b13c9d077b948 | |
parent | 69cdbe6f396c3aa05e0ceee9d321ede49bb83b2d [diff] [blame] |
bsc_/gprs_subscriber: fix: use osmo_strlcpy() to safely copy IMSI Fixes: coverity scan CID 163918 Change-Id: I4b2760b006a0707928530b4390c6997b79b02981
diff --git a/openbsc/src/libbsc/bsc_subscriber.c b/openbsc/src/libbsc/bsc_subscriber.c index a5e40cd..73e61e8 100644 --- a/openbsc/src/libbsc/bsc_subscriber.c +++ b/openbsc/src/libbsc/bsc_subscriber.c
@@ -80,7 +80,7 @@ { if (!bsub) return; - strncpy(bsub->imsi, imsi, sizeof(bsub->imsi)); + osmo_strlcpy(bsub->imsi, imsi, sizeof(bsub->imsi)); } struct bsc_subscr *bsc_subscr_find_or_create_by_imsi(struct llist_head *list,