All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] avdtp: add NULL check to avdtp_has_stream()
@ 2024-06-28 15:04 Roman Smirnov
  2024-06-28 16:38 ` [BlueZ,v1] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Roman Smirnov @ 2024-06-28 15:04 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.
---
 profiles/audio/avdtp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/profiles/audio/avdtp.c b/profiles/audio/avdtp.c
index 3667e0840..913298319 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)
+		return FALSE;
+
 	return g_slist_find(session->streams, stream) ? TRUE : FALSE;
 }
 
-- 
2.43.0


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

* RE: [BlueZ,v1] avdtp: add NULL check to avdtp_has_stream()
  2024-06-28 15:04 [PATCH BlueZ v1] avdtp: add NULL check to avdtp_has_stream() Roman Smirnov
@ 2024-06-28 16:38 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2024-06-28 16:38 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=866642

---Test result---

Test Summary:
CheckPatch                    PASS      0.44 seconds
GitLint                       PASS      0.31 seconds
BuildEll                      PASS      24.73 seconds
BluezMake                     PASS      1644.91 seconds
MakeCheck                     PASS      13.35 seconds
MakeDistcheck                 PASS      175.44 seconds
CheckValgrind                 PASS      250.49 seconds
CheckSmatch                   PASS      350.87 seconds
bluezmakeextell               PASS      118.51 seconds
IncrementalBuild              PASS      1415.10 seconds
ScanBuild                     PASS      979.88 seconds



---
Regards,
Linux Bluetooth


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

end of thread, other threads:[~2024-06-28 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 15:04 [PATCH BlueZ v1] avdtp: add NULL check to avdtp_has_stream() Roman Smirnov
2024-06-28 16:38 ` [BlueZ,v1] " bluez.test.bot

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.