Fix bluetoothd crash issue 88/179388/3
authorNagaraj D R <nagaraj.dr@samsung.com>
Thu, 17 May 2018 12:13:23 +0000 (17:43 +0530)
committerNagaraj D R <nagaraj.dr@samsung.com>
Thu, 17 May 2018 13:50:28 +0000 (19:20 +0530)
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=<optimized out>,
    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 <introspect_methods>,
    method=0xb6f42324 <introspect_methods>) at gdbus/object.c:282
11 0xb6efd3b8 in generic_message (connection=0xb7f40590, message=0xb7f44908,
    user_data=<optimized out>) at gdbus/object.c:1106

Change-Id: I8bd5c0e575f23f29945df49bbc3a807d55829989

profiles/tds/tds.c [changed mode: 0755->0644]
src/device.c
src/gatt-client.c

old mode 100755 (executable)
new mode 100644 (file)
index b72d1e5..1c4d31b
@@ -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[] = {
index 6dc12a4..bd1b87e 100644 (file)
@@ -4339,6 +4339,7 @@ static const GDBusSignalTable device_signals[] = {
        { GDBUS_SIGNAL("IpspStateChanged",
                        GDBUS_ARGS({"connected","b"}, {"if_name","s"}))},
        { GDBUS_SIGNAL("OtcDisconnected", NULL)},
+       { }
 };
 #endif
 
index a3f3765..ddf5ad8 100644 (file)
@@ -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