Skip to contentSkip to conversation

client: Fix crashing command info

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages May 19, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 client: Fix crashing command info

From: Luiz Augusto von Dentz <[email protected]>

If command info is called without any parameters, and without connecting any device, it will call find_set which doesn't check argc and argv are actually valid.

---
 client/main.c | 3 +++
 1 file changed, 3 insertions(+)
client/main.c +3 -0
index 36a7446d52c1..5d53a7be11e4 100644
@@ -1641,6 +1641,9 @@ static struct GDBusProxy *find_set(int argc, char *argv[])
 	if (check_default_ctrl() == FALSE)
 		return NULL;
 
+	if (argc < 2 || !strlen(argv[1]))
+		return NULL;
+
 	proxy = find_proxies_by_path(default_ctrl->sets, argv[1]);
 	if (!proxy) {
 		bt_shell_printf("DeviceSet %s not available\n", argv[1]);
Signature · 1 line
2.49.0
#1 lore raw

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

---Test result---

Test Summary:

CheckPatch                    PENDING   0.27 seconds
GitLint                       PENDING   0.23 seconds
BuildEll                      PASS      20.61 seconds
BluezMake                     PASS      2741.00 seconds
MakeCheck                     PASS      20.66 seconds
MakeDistcheck                 PASS      197.23 seconds
CheckValgrind                 PASS      272.58 seconds
CheckSmatch                   PASS      299.74 seconds
bluezmakeextell               PASS      127.64 seconds
IncrementalBuild              PENDING   0.29 seconds
ScanBuild                     PASS      913.75 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Mon, 19 May 2025 10:20:09 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

If command info is called without any parameters, and without connecting any device, it will call find_set which doesn't check argc and argv are actually valid.

[...]

Here is the summary with links:
- [BlueZ,v1] client: Fix crashing command info

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=6a8fb8a00e53

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html