summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2021-09-08 06:44:16 +0000
committerGerrit Code Review <gerrit@review>2021-09-08 06:44:16 +0000
commitf163f1c350e5becea41cafdd2370d1502ba842cc (patch)
tree740fe1890f29177cea69946c50a462e1ba96c035
parent7ef7e96fc2f3eb620fffb6f277339214efe83747 (diff)
parentd4281c2cb7c8b1ad02669a03369872230394b509 (diff)
downloadconnman-f163f1c350e5becea41cafdd2370d1502ba842cc.tar.gz
connman-f163f1c350e5becea41cafdd2370d1502ba842cc.tar.bz2
connman-f163f1c350e5becea41cafdd2370d1502ba842cc.zip
Merge "wireguard: Copy interfance names obeying lengths rules" into tizen
-rw-r--r--vpn/plugins/wireguard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vpn/plugins/wireguard.c b/vpn/plugins/wireguard.c
index ec57c93d..1da0ffb3 100644
--- a/vpn/plugins/wireguard.c
+++ b/vpn/plugins/wireguard.c
@@ -407,7 +407,7 @@ static int wg_connect(struct vpn_provider *provider,
err = -ENOENT;
goto done;
}
- stpncpy(info->device.name, ifname, sizeof(info->device.name));
+ stpncpy(info->device.name, ifname, sizeof(info->device.name) - 1);
g_free(ifname);
err = wg_add_device(info->device.name);