[Bluez PATCH] avdtp: Fix parsing capabilities

Subsystems: the rest

STALE1871d REVIEWED: 2 (0M)

2 review trailers.

3 messages, 3 authors, 2021-06-17 · open the first message on its own page

[Bluez PATCH] avdtp: Fix parsing capabilities

From: Archie Pusaka <hidden>
Date: 2021-06-17 00:53:58

From: Archie Pusaka <redacted>

This patch fixes size comparison and variable misassignment.

Reviewed-by: Alain Michaud <redacted>
Reviewed-by: Michael Sun <redacted>
---

 profiles/audio/avdtp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index c7bf99f429..5d13104c10 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -1323,7 +1323,7 @@ static GSList *caps_to_list(uint8_t *data, size_t size,
 
 		cap = (struct avdtp_service_capability *)data;
 
-		if (sizeof(*cap) + cap->length >= size) {
+		if (sizeof(*cap) + cap->length > size) {
 			error("Invalid capability data in getcap resp");
 			break;
 		}
@@ -1345,7 +1345,7 @@ static GSList *caps_to_list(uint8_t *data, size_t size,
 		switch (cap->category) {
 		case AVDTP_MEDIA_CODEC:
 			if (codec)
-				*codec = cap;
+				*codec = cpy;
 			break;
 		case AVDTP_DELAY_REPORTING:
 			if (delay_reporting)
-- 
2.32.0.272.g935e593368-goog

RE: [Bluez] avdtp: Fix parsing capabilities

From: <hidden>
Date: 2021-06-17 01:25:54

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.63 seconds
GitLint                       PASS      0.10 seconds
Prep - Setup ELL              PASS      39.84 seconds
Build - Prep                  PASS      0.10 seconds
Build - Configure             PASS      6.94 seconds
Build - Make                  PASS      171.48 seconds
Make Check                    PASS      8.72 seconds
Make Distcheck                PASS      201.76 seconds
Build w/ext ELL - Configure   PASS      6.95 seconds
Build w/ext ELL - Make        PASS      161.26 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

Re: [Bluez] avdtp: Fix parsing capabilities

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2021-06-17 20:50:38

Hi Archie,

On Wed, Jun 16, 2021 at 7:45 PM [off-list ref] wrote:
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=501973

---Test result---

Test Summary:
CheckPatch                    PASS      0.63 seconds
GitLint                       PASS      0.10 seconds
Prep - Setup ELL              PASS      39.84 seconds
Build - Prep                  PASS      0.10 seconds
Build - Configure             PASS      6.94 seconds
Build - Make                  PASS      171.48 seconds
Make Check                    PASS      8.72 seconds
Make Distcheck                PASS      201.76 seconds
Build w/ext ELL - Configure   PASS      6.95 seconds
Build w/ext ELL - Make        PASS      161.26 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
Applied, thanks.

-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help