diff mbox series

[BlueZ,v1] audio/a2dp: add NULL checks to find_remote_sep()

Message ID 20240702073955.10962-1-r.smirnov@omp.ru (mailing list archive)
State Accepted
Commit 922a8a8bd4949b073e6423a0f0d59bb273d88014
Headers show
Series [BlueZ,v1] audio/a2dp: add NULL checks to find_remote_sep() | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild success Scan Build PASS

Commit Message

Roman Smirnov July 2, 2024, 7:39 a.m. UTC
Make find_remote_sep() safe for passing NULL pointers.

Found with the SVACE static analysis tool.
---
 profiles/audio/a2dp.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

bluez.test.bot@gmail.com July 2, 2024, 9:43 a.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=867428

---Test result---

Test Summary:
CheckPatch                    PASS      0.43 seconds
GitLint                       PASS      0.30 seconds
BuildEll                      PASS      26.44 seconds
BluezMake                     PASS      1611.40 seconds
MakeCheck                     PASS      13.31 seconds
MakeDistcheck                 PASS      176.99 seconds
CheckValgrind                 PASS      250.12 seconds
CheckSmatch                   PASS      351.41 seconds
bluezmakeextell               PASS      125.11 seconds
IncrementalBuild              PASS      1551.65 seconds
ScanBuild                     PASS      984.95 seconds



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org July 3, 2024, 3:10 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue, 2 Jul 2024 10:39:55 +0300 you wrote:
> Make find_remote_sep() safe for passing NULL pointers.
> 
> Found with the SVACE static analysis tool.
> ---
>  profiles/audio/a2dp.c | 3 +++
>  1 file changed, 3 insertions(+)

Here is the summary with links:
  - [BlueZ,v1] audio/a2dp: add NULL checks to find_remote_sep()
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=922a8a8bd494

You are awesome, thank you!
diff mbox series

Patch

diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c
index a3c294bc3..43da38051 100644
--- a/profiles/audio/a2dp.c
+++ b/profiles/audio/a2dp.c
@@ -1327,6 +1327,9 @@  static struct a2dp_remote_sep *find_remote_sep(struct a2dp_channel *chan,
 {
 	struct avdtp_remote_sep *rsep;
 
+	if (!chan || !sep)
+		return NULL;
+
 	rsep = avdtp_find_remote_sep(chan->session, sep->lsep);
 
 	return queue_find(chan->seps, match_remote_sep, rsep);