Diff between 826058933c62dec5b20aab8428cd91ad12aa1141 and db822878f371c049b231212d348c45ebe60f7ddf
Changed Files
| File | Additions | Deletions | Status |
| profiles/audio/avrcp.c | +3 | -1 | modified |
Full Patch
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index 32062db..4965b0c 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1399,11 +1399,13 @@ static uint8_t avrcp_handle_set_absolute_volume(struct avrcp *session,
{
struct avrcp_player *player = session->player;
uint16_t len = ntohs(pdu->params_len);
+ uint8_t volume;
if (len != 1)
goto err;
- if (pdu->params[0] > 127)
+ volume = pdu->params[0] & 0x7F;
+ if (volume > 127)
goto err;
if (!player)