diff options
Diffstat (limited to 'src/host/layer23/src')
-rw-r--r-- | src/host/layer23/src/mobile/mncc_sock.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/settings.c | 2 | ||||
-rw-r--r-- | src/host/layer23/src/mobile/vty_interface.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/host/layer23/src/mobile/mncc_sock.c b/src/host/layer23/src/mobile/mncc_sock.c index 73159270..39eb7bcc 100644 --- a/src/host/layer23/src/mobile/mncc_sock.c +++ b/src/host/layer23/src/mobile/mncc_sock.c @@ -315,7 +315,7 @@ int osmo_unixsock_listen(struct osmo_fd *bfd, int type, const char *path) } local.sun_family = AF_UNIX; - strncpy(local.sun_path, path, sizeof(local.sun_path)); + osmo_strlcpy(local.sun_path, path, sizeof(local.sun_path)); local.sun_path[sizeof(local.sun_path) - 1] = '\0'; unlink(local.sun_path); diff --git a/src/host/layer23/src/mobile/settings.c b/src/host/layer23/src/mobile/settings.c index 6a7cd81d..7137761d 100644 --- a/src/host/layer23/src/mobile/settings.c +++ b/src/host/layer23/src/mobile/settings.c @@ -189,7 +189,7 @@ int gsm_random_imei(struct gsm_settings *set) sprintf(rand + 8, "%07d", layer23_random() % 10000000); strcpy(set->imei + 15 - digits, rand + 15 - digits); - strncpy(set->imeisv, set->imei, 15); + osmo_strlcpy(set->imeisv, set->imei, 15); return 0; } diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c index ec1216ff..4adcf905 100644 --- a/src/host/layer23/src/mobile/vty_interface.c +++ b/src/host/layer23/src/mobile/vty_interface.c @@ -1141,7 +1141,7 @@ DEFUN(cfg_gps_device, cfg_gps_device_cmd, "gps device DEVICE", "GPS receiver\nSelect serial device\n" "Full path of serial device including /dev/") { - strncpy(g.device, argv[0], sizeof(g.device)); + osmo_strlcpy(g.device, argv[0], sizeof(g.device)); g.device[sizeof(g.device) - 1] = '\0'; g.gps_type = GPS_TYPE_SERIAL; if (g.enable) { |