diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-01-21 17:38:02 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2016-03-11 11:40:38 +0200 |
commit | 5eb47745978925e451523c8e8cb2ad6a53ed3863 (patch) | |
tree | 7ad5e071d8b4abea95a62882b38d6d92dc72efc7 /profiles/audio/avrcp.c | |
parent | f9cd4a1871ff0765cc5c03a2c21f9d2f7d9262c7 (diff) | |
download | bluez-5eb47745978925e451523c8e8cb2ad6a53ed3863.tar.gz |
audio/avrcp: Don't print an error if folder length is 0baserock/5.37+service-api
Some stacks, for instance iOS, does actually send 0 as folder length
so just ignore if that happens since that means only means the folder
doesn't have a name.
Diffstat (limited to 'profiles/audio/avrcp.c')
-rw-r--r-- | profiles/audio/avrcp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c index 0c3a761b2..638272150 100644 --- a/profiles/audio/avrcp.c +++ b/profiles/audio/avrcp.c @@ -2656,8 +2656,10 @@ static gboolean avrcp_set_browsed_player_rsp(struct avctp *conn, uint8_t len; len = pdu->params[i++]; + if (!len) + continue; - if (i + len > operand_count || len == 0) { + if (i + len > operand_count) { error("Invalid folder length"); break; } |