public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] [PATCH] hcid/dbus crasher fix
@ 2005-08-18 16:50 Nathaniel McCallum
  2005-08-19 14:53 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Nathaniel McCallum @ 2005-08-18 16:50 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

The following patch corrects a crasher bug when using hcid with dbus.

I'm still having a problem even after this bug, hcid just exits with
exitstatus 1 (but at least it doesn't crash).  Any ideas?

BTW, I'm not subscribed to the list, so please CC me in any responses.

Nathaniel

[-- Attachment #2: bluez-utils-2.19-segfault.patch --]
[-- Type: text/x-patch, Size: 1029 bytes --]

diff -Nru bluez-utils-2.19.orig/hcid/dbus.c bluez-utils-2.19/hcid/dbus.c
--- bluez-utils-2.19.orig/hcid/dbus.c	2005-08-06 07:14:00.000000000 -0400
+++ bluez-utils-2.19/hcid/dbus.c	2005-08-18 12:36:03.000000000 -0400
@@ -224,9 +224,13 @@
 	DBusMessageIter iter;
 #endif
 	char local_addr[18], peer_addr[18];
+	char **local_addr_tmp, **peer_addr_tmp, **name_tmp;
 
 	ba2str(local, local_addr);
 	ba2str(peer, peer_addr);
+	local_addr_tmp = &local_addr;
+	peer_addr_tmp = &peer_addr;
+	name_tmp = &name;
 
 	message = dbus_message_new_signal("/org/bluez/DevAgent",
 				"org.bluez.DevAgent", "RemoteName");
@@ -237,9 +241,9 @@
 
 #ifdef HAVE_DBUS_MESSAGE_APPEND_ARGS
 	dbus_message_append_args(message,
-					DBUS_TYPE_STRING, local_addr,
-					DBUS_TYPE_STRING, peer_addr,
-					DBUS_TYPE_STRING, name,
+					DBUS_TYPE_STRING, &local_addr_tmp,
+					DBUS_TYPE_STRING, &peer_addr_tmp,
+					DBUS_TYPE_STRING, &name_tmp,
 					DBUS_TYPE_INVALID);
 #else
 	dbus_message_append_iter_init(message, &iter);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-19 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 16:50 [Bluez-devel] [PATCH] hcid/dbus crasher fix Nathaniel McCallum
2005-08-19 14:53 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox