From fa81901ed89f4dc0e2776c87f1afb75be89073be Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 20 Jan 2014 22:27:23 +0100 Subject: [PATCH] core/platform: replace strcpy by g_strlcpy Signed-off-by: Thomas Haller --- src/platform/nm-linux-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index fd476c4103..cc704bff4e 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -692,7 +692,7 @@ link_init (NMPlatform *platform, NMPlatformLink *info, struct rtnl_link *rtnllin g_assert (rtnllink); info->ifindex = rtnl_link_get_ifindex (rtnllink); - strcpy (info->name, rtnl_link_get_name (rtnllink)); + g_strlcpy (info->name, rtnl_link_get_name (rtnllink), sizeof (info->name)); info->type = link_extract_type (platform, rtnllink, &info->type_name); info->up = !!(rtnl_link_get_flags (rtnllink) & IFF_UP); info->connected = !!(rtnl_link_get_flags (rtnllink) & IFF_LOWER_UP);