public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Nathaniel McCallum <npmccallum@asbury.edu>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] [PATCH] hcid/dbus crasher fix
Date: Thu, 18 Aug 2005 12:50:20 -0400	[thread overview]
Message-ID: <1124383820.2312.3.camel@vacation.asbury.edu> (raw)

[-- 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);

             reply	other threads:[~2005-08-18 16:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-18 16:50 Nathaniel McCallum [this message]
2005-08-19 14:53 ` [Bluez-devel] [PATCH] hcid/dbus crasher fix Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1124383820.2312.3.camel@vacation.asbury.edu \
    --to=npmccallum@asbury.edu \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox