diff options
Diffstat (limited to 'openbsc/src/gprs/gtphub.c')
-rw-r--r-- | openbsc/src/gprs/gtphub.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsc/src/gprs/gtphub.c b/openbsc/src/gprs/gtphub.c index a0af42bee..83e17dbd4 100644 --- a/openbsc/src/gprs/gtphub.c +++ b/openbsc/src/gprs/gtphub.c @@ -2360,8 +2360,7 @@ void gtphub_resolved_ggsn(struct gtphub *hub, const char *apn_oi_str, ggsn->peer = pp; gtphub_port_ref_count_inc(pp); - strncpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); - ggsn->apn_oi_str[sizeof(ggsn->apn_oi_str) - 1] = '\0'; + osmo_strlcpy(ggsn->apn_oi_str, apn_oi_str, sizeof(ggsn->apn_oi_str)); ggsn->expiry_entry.del_cb = resolved_gssn_del_cb; expiry_add(&hub->expire_slowly, &ggsn->expiry_entry, now); |