Commit 18b0d2d1 authored by Youness Alaoui's avatar Youness Alaoui
Browse files

use g_strlcpy instead of strncpy for nice_interfaces_get_ip_for_interface too

parent 9d8d4f48
......@@ -294,7 +294,7 @@ nice_interfaces_get_ip_for_interface (gchar *interface_name)
ifr.ifr_addr.sa_family = AF_INET;
memset (ifr.ifr_name, 0, sizeof (ifr.ifr_name));
strncpy (ifr.ifr_name, interface_name, sizeof (ifr.ifr_name)-1);
g_strlcpy (ifr.ifr_name, interface_name, sizeof (ifr.ifr_name));
if ((sockfd = socket (AF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0) {
nice_debug ("Error : Cannot open socket to retreive interface list");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment