Package: bluez-tools Version: 0.2.0~20140808-4 Severity: grave Tags: patch upstream Justification: renders package unusable
Dear Maintainer, While trying to use bt-obex command to exchange file with a mobile phone device, I have faced a number of unexpected Segmentation Faults. I took time to investigate and found the problem in the source, so I have prepared a patch that I have sent to Alexander Orlenko which seems to be the author of the tools, in hope to have it integrated upstream. I have attached the patch of interrest (5th of 5 patches), but be warned that I have made it against Git's latest state, so I am not sure it would apply to the current debian source state. I am adding Sam Morris in copy because he has reported 2 bugs which may be linked to similar issue, so if he has the possibility to test it would be interresting to know if it improves his cases. Regards, Christophe. -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.3.0-1-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system)
>From 5046c746adbaba3137723a5be38e705f5d29e606 Mon Sep 17 00:00:00 2001 From: Christophe CURIS <christophe.cu...@free.fr> Date: Thu, 31 Dec 2015 12:03:16 +0100 Subject: [PATCH 5/5] Fix incorrect return value compare In the function obex_client_create_session, when the call to the dbus function would return a NULL pointer then the program would terminate with a "Segmentation Fault" message without further explanation, and it is not sure that in other cases it did behave as expected. Now the bt-obex command properly display the error message when dbus gives one and works in the other case. Signed-off-by: Christophe CURIS <christophe.cu...@free.fr> --- src/lib/bluez/obex/obex_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/bluez/obex/obex_client.c b/src/lib/bluez/obex/obex_client.c index 02b65bb..2a4f20a 100644 --- a/src/lib/bluez/obex/obex_client.c +++ b/src/lib/bluez/obex/obex_client.c @@ -144,7 +144,7 @@ const gchar *obex_client_create_session(ObexClient *self, const gchar *destinati g_assert(OBEX_CLIENT_IS(self)); const gchar *ret = NULL; GVariant *proxy_ret = g_dbus_proxy_call_sync(self->priv->proxy, "CreateSession", g_variant_new ("(s@a{sv})", destination, args), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); - if (proxy_ret != NULL) + if (proxy_ret == NULL) return NULL; proxy_ret = g_variant_get_child_value(proxy_ret, 0); ret = g_variant_get_string(proxy_ret, NULL); -- 2.6.4