NetworkManager r3972 - in branches/NETWORKMANAGER_0_6_0_RELEASE: . src
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r3972 - in branches/NETWORKMANAGER_0_6_0_RELEASE: . src
- Date: Sat, 16 Aug 2008 03:56:30 +0000 (UTC)
Author: dcbw
Date: Sat Aug 16 03:56:30 2008
New Revision: 3972
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3972&view=rev
Log:
2008-08-15 Dan Williams <dcbw redhat com>
* src/nm-dbus-net.c
- (nm_dbus_net_get_address): fix crash (bgo #459323)
Modified:
branches/NETWORKMANAGER_0_6_0_RELEASE/ChangeLog
branches/NETWORKMANAGER_0_6_0_RELEASE/src/nm-dbus-net.c
Modified: branches/NETWORKMANAGER_0_6_0_RELEASE/src/nm-dbus-net.c
==============================================================================
--- branches/NETWORKMANAGER_0_6_0_RELEASE/src/nm-dbus-net.c (original)
+++ branches/NETWORKMANAGER_0_6_0_RELEASE/src/nm-dbus-net.c Sat Aug 16 03:56:30 2008
@@ -131,11 +131,13 @@
if ((reply = dbus_message_new_method_return (message)))
{
- char buf[20];
+ const struct ether_addr *addr = nm_ap_get_address (data->ap);
+ char *buf;
- memset (&buf[0], 0, 20);
- iw_ether_ntop((const struct ether_addr *) (nm_ap_get_address (data->ap)), &buf[0]);
+ buf = g_malloc0 (25);
+ iw_ether_ntop (addr, buf);
dbus_message_append_args (reply, DBUS_TYPE_STRING, &buf, DBUS_TYPE_INVALID);
+ g_free (buf);
}
return reply;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]