diff options
author | Oliver Smith <osmith@sysmocom.de> | 2018-10-31 10:29:51 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2018-10-31 10:33:47 +0100 |
commit | f2d2fef39faebcb73570ccdab41bdfef855c7e3b (patch) | |
tree | 2be421a57a4d18c824f61daeb1aa303b3145429a /src | |
parent | 8d8d710a281f5e284ce17c531e85ab5b2f1e5bce (diff) |
ipaccess_sign_link_reject: fix: use osmo_strlcpy() to safely copy IP
Fixes: coverity scan CID#189459
Change-Id: Ib9c5e374b9c5c8f79eecf95c439a25b0f438e4e5
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bsc/bts_ipaccess_nanobts.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c index 40cabb8a5..1fffd89c4 100644 --- a/src/osmo-bsc/bts_ipaccess_nanobts.c +++ b/src/osmo-bsc/bts_ipaccess_nanobts.c @@ -32,6 +32,7 @@ #include <osmocom/core/msgb.h> #include <osmocom/core/socket.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/utils.h> #include <osmocom/bsc/gsm_data.h> #include <osmocom/bsc/abis_nm.h> #include <osmocom/bsc/abis_rsl.h> @@ -494,7 +495,7 @@ static void ipaccess_sign_link_reject(const struct ipaccess_unit *dev, const str return; entry->site_id = site_id; entry->bts_id = bts_id; - strncpy(entry->ip, ip, sizeof(entry->ip)); + osmo_strlcpy(entry->ip, ip, sizeof(entry->ip)); } /* Add to beginning with current timestamp */ |