mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-12-02 08:34:26 +08:00
unit/avrcp: Fix possible buffer overflow
values[] should be the same size as attr[].
This commit is contained in:
parent
9bf4b1c73a
commit
c62dfb9b8d
@ -354,10 +354,12 @@ static int get_value_text(struct avrcp *session, uint8_t transaction,
|
||||
static int get_value(struct avrcp *session, uint8_t transaction,
|
||||
uint8_t number, uint8_t *attrs, void *user_data)
|
||||
{
|
||||
uint8_t values[2] = { 0x00, 0x00 };
|
||||
uint8_t values[number];
|
||||
|
||||
DBG("");
|
||||
|
||||
memset(values, 0, number);
|
||||
|
||||
avrcp_get_current_player_value_rsp(session, transaction, number, attrs,
|
||||
values);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user