Use strtol not atoi (David Cantrell <dcantrell@redhat.com>) rh #447776

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3776 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-06-26 19:23:29 +00:00
parent b0cf66eda8
commit 518095511e

View file

@ -1015,7 +1015,12 @@ nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager,
str = g_hash_table_lookup (device->options, "new_interface_mtu");
if (str) {
int int_mtu = atoi (str);
int int_mtu;
errno = 0;
int_mtu = strtol (str, NULL, 10);
if ((errno == EINVAL) || (errno == ERANGE))
goto error;
if (int_mtu)
nm_ip4_config_set_mtu (ip4_config, int_mtu);