Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH_v2 1/2] android/hidhost: Fix miscalculation of get report event notification length
@ 2014-01-21 12:24 Ravi kumar Veeramally
  2014-01-21 12:24 ` [PATCH_v2 2/2] android/tester: Add HIDhost GetReport test Ravi kumar Veeramally
  2014-01-21 15:20 ` [PATCH_v2 1/2] android/hidhost: Fix miscalculation of get report event notification length Szymon Janc
  0 siblings, 2 replies; 3+ messages in thread
From: Ravi kumar Veeramally @ 2014-01-21 12:24 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Ravi kumar Veeramally

Event length is size of struct + data len (if any). It is miscalulated.
---
 android/hidhost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/hidhost.c b/android/hidhost.c
index 3da77c8..108493a 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -371,7 +371,7 @@ static void bt_hid_notify_get_report(struct hid_device *dev, uint8_t *buf,
 	ba2str(&dev->dst, address);
 	DBG("device %s", address);
 
-	ev_len = sizeof(*ev) + sizeof(struct hal_ev_hidhost_get_report) + 1;
+	ev_len = sizeof(*ev);
 
 	if (!((buf[0] == (HID_MSG_DATA | HID_DATA_TYPE_INPUT)) ||
 			(buf[0] == (HID_MSG_DATA | HID_DATA_TYPE_OUTPUT)) ||
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-21 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-21 12:24 [PATCH_v2 1/2] android/hidhost: Fix miscalculation of get report event notification length Ravi kumar Veeramally
2014-01-21 12:24 ` [PATCH_v2 2/2] android/tester: Add HIDhost GetReport test Ravi kumar Veeramally
2014-01-21 15:20 ` [PATCH_v2 1/2] android/hidhost: Fix miscalculation of get report event notification length Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox