OSDN Git Service

android: Fix sending invalid remote device property event
authorSzymon Janc <szymon.janc@tieto.com>
Sat, 16 Nov 2013 14:09:45 +0000 (15:09 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Sat, 16 Nov 2013 18:22:01 +0000 (20:22 +0200)
Remote device property event has variable length, pass whole event
length to ipc_send, not only header.

android/bluetooth.c

index 4439cc6..6a7ba9d 100644 (file)
@@ -605,7 +605,7 @@ static void send_remote_device_name_prop(const bdaddr_t *bdaddr)
        memcpy(&ev->props[0].val, name, strlen(name));
 
        ipc_send(notification_sk, HAL_SERVICE_ID_BLUETOOTH,
-                       HAL_EV_REMOTE_DEVICE_PROPS, sizeof(ev), ev, -1);
+                       HAL_EV_REMOTE_DEVICE_PROPS, ev_len, ev, -1);
 
        g_free(ev);
 }