[Frugalware-darcs] fw-control-center: gnetconfig: Fixed a segfault while adding a wireless interface

Priyank priyank at frugalware.org
Sat Jun 16 16:40:57 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=fw-control-center;a=darcs_commitdiff;h=20070616143324-5ce2c-63f7076100093177afd4c6bad2b029d39347ffd9.gz;

[gnetconfig: Fixed a segfault while adding a wireless interface
Priyank <priyank at frugalware.org>**20070616143324
 
 * gnetconfig shouldn't segfault when the user adds a new wireless
   interface without configuring the wireless params.
] {
hunk ./gnetconfig/src/gnetconfig-new_interface.c 339
-		if (strlen(mode))
+		if (mode != NULL)
hunk ./gnetconfig/src/gnetconfig-new_interface.c 341
-			snprintf (nif->mode, FWNET_MODE_MAX_SIZE, mode);
-			g_free (mode);
+			if (strlen(mode))
+			{
+				snprintf (nif->mode, FWNET_MODE_MAX_SIZE, mode);
+				g_free (mode);
+			}
}


More information about the Frugalware-darcs mailing list