xchat-gnome crashed with SIGSEGV in g_hash_table_foreach()



Hi all,

I met a segfault issue with xchat-gnome in Ubuntu Oneiric.

The following small patch fixes the segfault when network status is changing.

--- xchat-gnome-0.30.0~git20100421.29cc76.orig/plugins/net-monitor/net-monitor.c
+++ xchat-gnome-0.30.0~git20100421.29cc76/plugins/net-monitor/net-monitor.c
@@ -176,7 +176,8 @@ set_network_mode (NetworkStatus status)
 		 */
 		res_init();

-		g_hash_table_foreach (networks, (GHFunc) connect_to_network, NULL);
+		if(networks)
+			g_hash_table_foreach (networks, (GHFunc) connect_to_network, NULL);
 	}
 }

Please find more details here:
https://bugs.launchpad.net/ubuntu/+source/xchat-gnome/+bug/851058

Thanks,
Li


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]