[PATCH BlueZ 3/3] android/avrcp-lib: Fix avrcp_get_player_attribute_text_rsp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

avrcp_get_player_attribute_text_rsp was generating invalid responses as
it fills the string data in the wrong field.
---
 android/avrcp-lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c
index d360870..1d7fff5 100644
--- a/android/avrcp-lib.c
+++ b/android/avrcp-lib.c
@@ -882,7 +882,7 @@ int avrcp_get_player_attribute_text_rsp(struct avrcp *session,
 		ptr[0] = attrs[i];
 		bt_put_be16(AVRCP_CHARSET_UTF8, &ptr[1]);
 		ptr[3] = len;
-		memcpy(ptr, text[i], len);
+		memcpy(&ptr[4], text[i], len);
 		ptr += 4 + len;
 		length += 4 + len;
 	}
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux