2021-06-17 02:43:54

by Archie Pusaka

[permalink] [raw]
Subject: [Bluez PATCH] avdtp: Fix parsing capabilities

From: Archie Pusaka <[email protected]>

This patch fixes size comparison and variable misassignment.

Reviewed-by: Alain Michaud <[email protected]>
Reviewed-by: Michael Sun <[email protected]>
---

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


2021-06-17 02:45:52

by bluez.test.bot

[permalink] [raw]
Subject: RE: [Bluez] avdtp: Fix parsing capabilities

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

2021-06-18 01:57:11

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [Bluez] avdtp: Fix parsing capabilities

Hi Archie,

On Wed, Jun 16, 2021 at 7:45 PM <[email protected]> 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