2005-12-07 Robert Love <rml@novell.com>
* src/NetworkManagerDevice.c: strncpy() buffer check. * src/NetworkManagerUtils.c: be anal about syslog() formatting. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1141 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2005-12-07 Robert Love <rml@novell.com>
|
||||
|
||||
* src/NetworkManagerDevice.c: strncpy() buffer check.
|
||||
* src/NetworkManagerUtils.c: be anal about syslog() formatting.
|
||||
|
||||
2005-12-06 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* gnome/applet/applet-dbus.c
|
||||
|
@@ -1677,7 +1677,7 @@ void nm_device_update_ip4_address (NMDevice *dev)
|
||||
return;
|
||||
|
||||
memset (&req, 0, sizeof (struct ifreq));
|
||||
strncpy ((char *)(&req.ifr_name), nm_device_get_iface (dev), strlen (nm_device_get_iface (dev)));
|
||||
strncpy (req.ifr_name, nm_device_get_iface (dev), sizeof (req.ifr_name) - 1);
|
||||
#ifdef IOCTL_DEBUG
|
||||
nm_info ("%s: About to GET IFADDR.", nm_device_get_iface (dev));
|
||||
#endif
|
||||
@@ -1744,7 +1744,7 @@ void nm_device_update_hw_address (NMDevice *dev)
|
||||
return;
|
||||
|
||||
memset (&req, 0, sizeof (struct ifreq));
|
||||
strncpy ((char *)(&req.ifr_name), nm_device_get_iface (dev), strlen (nm_device_get_iface (dev)));
|
||||
strncpy (req.ifr_name, nm_device_get_iface (dev), sizeof (req.ifr_name) - 1);
|
||||
#ifdef IOCTL_DEBUG
|
||||
nm_info ("%s: About to GET IFHWADDR.", nm_device_get_iface (dev));
|
||||
#endif
|
||||
@@ -1806,7 +1806,7 @@ gboolean nm_device_is_up (NMDevice *dev)
|
||||
return (FALSE);
|
||||
|
||||
/* Get device's flags */
|
||||
strcpy (ifr.ifr_name, nm_device_get_iface (dev));
|
||||
strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof (ifr.ifr_name) - 1);
|
||||
#ifdef IOCTL_DEBUG
|
||||
nm_info ("%s: About to GET IFFLAGS.", nm_device_get_iface (dev));
|
||||
#endif
|
||||
@@ -4304,7 +4304,7 @@ static gboolean supports_ethtool_carrier_detect (NMDevice *dev)
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof(ifr.ifr_name)-1);
|
||||
strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof(ifr.ifr_name) - 1);
|
||||
edata.cmd = ETHTOOL_GLINK;
|
||||
ifr.ifr_data = (char *) &edata;
|
||||
#ifdef IOCTL_DEBUG
|
||||
@@ -4369,7 +4369,7 @@ static gboolean supports_mii_carrier_detect (NMDevice *dev)
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof(ifr.ifr_name)-1);
|
||||
strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof (ifr.ifr_name) - 1);
|
||||
#ifdef IOCTL_DEBUG
|
||||
nm_info ("%s: About to GET MIIPHY\n", nm_device_get_iface (dev));
|
||||
#endif
|
||||
|
@@ -621,7 +621,7 @@ gboolean nm_completion_boolean_function1_test(int tries,
|
||||
if (message)
|
||||
if ((log_interval == 0 && tries == 0)
|
||||
|| (log_interval != 0 && tries % log_interval == 0))
|
||||
syslog(log_level, message);
|
||||
syslog(log_level, "%s", message);
|
||||
|
||||
if (!(*condition)(arg0))
|
||||
return TRUE;
|
||||
@@ -645,7 +645,7 @@ gboolean nm_completion_boolean_function2_test(int tries,
|
||||
if (message)
|
||||
if ((log_interval == 0 && tries == 0)
|
||||
|| (log_interval != 0 && tries % log_interval == 0))
|
||||
syslog(log_level, message);
|
||||
syslog(log_level, "%s", message);
|
||||
|
||||
if (!(*condition)(arg0, arg1))
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user