[PATCH 7/7] AVRCP: fix off-by-one in media attribute iteration

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

 



---
 audio/avrcp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/audio/avrcp.c b/audio/avrcp.c
index 0d9b6d0..3576008 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -603,7 +603,7 @@ static uint8_t avrcp_handle_get_element_attributes(struct avrcp_player *player,
 	nattr = pdu->params[8];
 
 	if (!nattr) {
-		for (i = 1; i < AVRCP_MEDIA_ATTRIBUTE_LAST; i++) {
+		for (i = 1; i <= AVRCP_MEDIA_ATTRIBUTE_LAST; i++) {
 			size = player_get_media_attribute(player, i,
 							&pdu->params[pos],
 							AVRCP_PDU_MTU - pos);
-- 
1.7.7

--
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