diff --git a/ChangeLog b/ChangeLog index 4f9489f36..62156d283 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-24 Dan Williams + + Patch from Ed Catmur: + * src/NetworkManagerUtils.c + - (nm_utils_ip4_netmask_to_prefix): don't infinitely loop + if netmask is 0 (Gnome #352634) + 2006-08-17 Robert Love * src/backends/NetworkManagerSuSE.c: Do not restart ypbind; our ypbind diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c index 309638e3b..12317853a 100644 --- a/src/NetworkManagerUtils.c +++ b/src/NetworkManagerUtils.c @@ -707,6 +707,8 @@ int nm_utils_ip4_netmask_to_prefix (guint32 ip4_netmask) { int i = 1; + g_return_val_if_fail (ip4_netmask != 0, 0); + /* Just count how many bit shifts we need */ ip4_netmask = ntohl (ip4_netmask); while (!(ip4_netmask & 0x1) && ++i)