diff mbox series

[BlueZ,v1] avrcp: fix byte order of PDU parameter length compare

Message ID 20210608103940.BlueZ.v1.1.Ifed45e2dfac25b2627fcaabc66cd29f6894ba07b@changeid (mailing list archive)
State New, archived
Headers show
Series [BlueZ,v1] avrcp: fix byte order of PDU parameter length compare | expand

Commit Message

Michael Sun June 8, 2021, 5:39 p.m. UTC
Fix the issue that directly uses params_len, from received PDU data,
for arithmetic calculation and comparison.

Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Michael Sun <michaelfsun@google.com>
---

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

Comments

bluez.test.bot@gmail.com June 8, 2021, 6:15 p.m. UTC | #1
This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=496449

---Test result---

Test Summary:
CheckPatch                    PASS      0.50 seconds
GitLint                       PASS      0.11 seconds
Prep - Setup ELL              PASS      39.24 seconds
Build - Prep                  PASS      0.09 seconds
Build - Configure             PASS      7.04 seconds
Build - Make                  PASS      167.01 seconds
Make Check                    PASS      8.71 seconds
Make Distcheck                PASS      200.39 seconds
Build w/ext ELL - Configure   PASS      6.98 seconds
Build w/ext ELL - Make        PASS      159.92 seconds

Details
##############################
Test: CheckPatch - PASS
Desc: Run checkpatch.pl script with rule in .checkpatch.conf

##############################
Test: GitLint - PASS
Desc: Run gitlint with rule in .gitlint

##############################
Test: Prep - Setup ELL - PASS
Desc: Clone, build, and install ELL

##############################
Test: Build - Prep - PASS
Desc: Prepare environment for build

##############################
Test: Build - Configure - PASS
Desc: Configure the BlueZ source tree

##############################
Test: Build - Make - PASS
Desc: Build the BlueZ source tree

##############################
Test: Make Check - PASS
Desc: Run 'make check'

##############################
Test: Make Distcheck - PASS
Desc: Run distcheck to check the distribution

##############################
Test: Build w/ext ELL - Configure - PASS
Desc: Configure BlueZ source with '--enable-external-ell' configuration

##############################
Test: Build w/ext ELL - Make - PASS
Desc: Build BlueZ source with '--enable-external-ell' configuration



---
Regards,
Linux Bluetooth
diff mbox series

Patch

diff --git a/profiles/audio/avrcp.c b/profiles/audio/avrcp.c
index ccf34b220..2265f87ab 100644
--- a/profiles/audio/avrcp.c
+++ b/profiles/audio/avrcp.c
@@ -1923,9 +1923,9 @@  static size_t handle_vendordep_pdu(struct avctp *conn, uint8_t transaction,
 	operands += sizeof(*pdu);
 	operand_count -= sizeof(*pdu);
 
-	if (pdu->params_len != operand_count) {
+	if (pdu->params_len != htons(operand_count)) {
 		DBG("AVRCP PDU parameters length don't match");
-		pdu->params_len = operand_count;
+		pdu->params_len = htons(operand_count);
 	}
 
 	for (handler = session->control_handlers; handler->pdu_id; handler++) {