mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 13:00:31 +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 commit 4d11eba8c5)
This commit is contained in:
parent
7c50748dcc
commit
2f6af40cd5
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