core/platform: replace strcpy by g_strlcpy

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-01-20 22:27:23 +01:00
parent c9e241e2f9
commit fa81901ed8

View file

@ -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);