All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v2] avdtp: add NULL checks to avdtp_has_stream()
@ 2024-06-29  8:36 Roman Smirnov
  2024-06-29 10:39 ` [BlueZ,v2] " bluez.test.bot
  2024-07-01 14:20 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Roman Smirnov @ 2024-06-29  8:36 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Roman Smirnov

Make avdtp_has_stream() safe for passing NULL pointers.

Found with the SVACE static analysis tool.
---
 V1 -> V2: added check for stream

 profiles/audio/avdtp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index 3667e0840..64735c5ee 100644
--- a/profiles/audio/avdtp.c
+++ b/profiles/audio/avdtp.c
@@ -3918,6 +3918,9 @@ struct btd_device *avdtp_get_device(struct avdtp *session)
 
 gboolean avdtp_has_stream(struct avdtp *session, struct avdtp_stream *stream)
 {
+	if (!session || !stream)
+		return FALSE;
+
 	return g_slist_find(session->streams, stream) ? TRUE : FALSE;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [BlueZ,v2] avdtp: add NULL checks to avdtp_has_stream()
  2024-06-29  8:36 [PATCH BlueZ v2] avdtp: add NULL checks to avdtp_has_stream() Roman Smirnov
@ 2024-06-29 10:39 ` bluez.test.bot
  2024-07-01 14:20 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-06-29 10:39 UTC (permalink / raw)
  To: linux-bluetooth, r.smirnov

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

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

---Test result---

Test Summary:
CheckPatch                    PASS      0.36 seconds
GitLint                       PASS      0.20 seconds
BuildEll                      PASS      24.32 seconds
BluezMake                     PASS      1685.08 seconds
MakeCheck                     PASS      13.62 seconds
MakeDistcheck                 PASS      176.12 seconds
CheckValgrind                 PASS      256.04 seconds
CheckSmatch                   PASS      351.98 seconds
bluezmakeextell               PASS      118.74 seconds
IncrementalBuild              PASS      1385.55 seconds
ScanBuild                     PASS      988.63 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH BlueZ v2] avdtp: add NULL checks to avdtp_has_stream()
  2024-06-29  8:36 [PATCH BlueZ v2] avdtp: add NULL checks to avdtp_has_stream() Roman Smirnov
  2024-06-29 10:39 ` [BlueZ,v2] " bluez.test.bot
@ 2024-07-01 14:20 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2024-07-01 14:20 UTC (permalink / raw)
  To: Roman Smirnov; +Cc: linux-bluetooth

Hello:

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

On Sat, 29 Jun 2024 11:36:18 +0300 you wrote:
> Make avdtp_has_stream() safe for passing NULL pointers.
> 
> Found with the SVACE static analysis tool.
> ---
>  V1 -> V2: added check for stream
> 
>  profiles/audio/avdtp.c | 3 +++
>  1 file changed, 3 insertions(+)

Here is the summary with links:
  - [BlueZ,v2] avdtp: add NULL checks to avdtp_has_stream()
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=be0b08770e92

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-07-01 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-29  8:36 [PATCH BlueZ v2] avdtp: add NULL checks to avdtp_has_stream() Roman Smirnov
2024-06-29 10:39 ` [BlueZ,v2] " bluez.test.bot
2024-07-01 14:20 ` [PATCH BlueZ v2] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.