From 94cedd3b0e3a6da8247c1774da1f8ac01de931f4 Mon Sep 17 00:00:00 2001 From: Nagaraj D R Date: Thu, 17 May 2018 17:43:23 +0530 Subject: [PATCH] Fix bluetoothd crash issue Bluetoothd crashes when any application invokes "Introspect" dbus method call on device-interface hosted by any device object path. Declaration of device_signals is corrected call stack 0 0xb6bfc3ee in strlen () from /lib/libc.so.6 1 0xb6bc69e4 in vfprintf () from /lib/libc.so.6 2 0xb6c65db0 in __vasprintf_chk () from /lib/libc.so.6 3 0xb6dbe404 in g_vasprintf () from /lib/libglib-2.0.so.0 4 0xb6da5dac in g_string_append_vprintf () from /lib/libglib-2.0.so.0 5 0xb6da5e7c in g_string_append_printf () from /lib/libglib-2.0.so.0 6 0xb6efbe94 in print_arguments (gstr=gstr@entry=0xb7f521a0, args=0xb6f221fc, direction=direction@entry=0x0) at gdbus/object.c:123 7 0xb6efc624 in generate_interface_xml (iface=, gstr=0xb7f521a0) at gdbus/object.c:187 8 generate_introspection_xml (data=0xb7f538a0, data=0xb7f538a0, path=0xb7f462e0 "/org/bluez/hci0/dev_E4_FA_ED_DF_2C_2D", conn=0xb7f40590) at gdbus/object.c:236 9 introspect (connection=0xb7f40590, message=0xb7f44908, user_data=0xb7f538a0) at gdbus/object.c:263 10 0xb6efd13a in process_message (connection=connection@entry=0xb7f40590, message=message@entry=0xb7f44908, iface_user_data=iface_user_data@entry=0xb7f538a0, method=0xb6f42324 , method=0xb6f42324 ) at gdbus/object.c:282 11 0xb6efd3b8 in generic_message (connection=0xb7f40590, message=0xb7f44908, user_data=) at gdbus/object.c:1106 Change-Id: I8bd5c0e575f23f29945df49bbc3a807d55829989 --- profiles/tds/tds.c | 1 + src/device.c | 1 + src/gatt-client.c | 2 ++ 3 files changed, 4 insertions(+) mode change 100755 => 100644 profiles/tds/tds.c diff --git a/profiles/tds/tds.c b/profiles/tds/tds.c old mode 100755 new mode 100644 index b72d1e5..1c4d31b --- a/profiles/tds/tds.c +++ b/profiles/tds/tds.c @@ -279,6 +279,7 @@ static const GDBusSignalTable tds_signals[] = { GDBUS_ARGS({ "org_id", "y"}, { "TdsDataBlock", "ay"})) }, { GDBUS_SIGNAL("TdsActivationIndCnfm", NULL) }, + { } }; static const GDBusMethodTable tds_methods[] = { diff --git a/src/device.c b/src/device.c index 6dc12a4..bd1b87e 100644 --- a/src/device.c +++ b/src/device.c @@ -4339,6 +4339,7 @@ static const GDBusSignalTable device_signals[] = { { GDBUS_SIGNAL("IpspStateChanged", GDBUS_ARGS({"connected","b"}, {"if_name","s"}))}, { GDBUS_SIGNAL("OtcDisconnected", NULL)}, + { } }; #endif diff --git a/src/gatt-client.c b/src/gatt-client.c index a3f3765..ddf5ad8 100644 --- a/src/gatt-client.c +++ b/src/gatt-client.c @@ -1858,12 +1858,14 @@ static const GDBusMethodTable characteristic_methods[] = { static const GDBusSignalTable service_signals[] = { { GDBUS_SIGNAL("GattServiceAdded", GDBUS_ARGS({ "Service Path","s"})) }, + { } }; static const GDBusSignalTable characteristic_signals[] = { { GDBUS_SIGNAL("GattValueChanged", GDBUS_ARGS({ "Result", "i"}, { "Characteristic Path","s"}, { "GattData", "ay"})) }, + { } }; #endif -- 2.7.4