mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 18:40:09 +01:00
ppp: avoid strncpy() in ppp plugin nm_phasechange()
strncpy() is deemed insecure, and it raises at least an eyebrow. While it's save in this case, just avoid it. (cherry picked from commit4d11eba8c5) (cherry picked from commit2f6af40cd5)
This commit is contained in:
parent
14732eef90
commit
7a8b692226
1 changed files with 1 additions and 1 deletions
|
|
@ -147,7 +147,7 @@ nm_phasechange (void *data, int arg)
|
|||
if ( if_indextoname (index, new_name)
|
||||
&& !nm_streq0 (ifname, new_name)) {
|
||||
g_message ("nm-ppp-plugin: interface name changed from '%s' to '%s'", ifname, new_name);
|
||||
strncpy (ifname, new_name, IF_NAMESIZE);
|
||||
g_strlcpy (ifname, new_name, IF_NAMESIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue