Skip to contentSkip to conversation

mesh: Fix possible null pointer deference

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages May 9, 2025 – May 12, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 mesh: Fix possible null pointer deference

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

This fixes possible null pointer deference for label reported by cppcheck.

---
 mesh/cfgmod-server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
mesh/cfgmod-server.c +1 -1
index e5d5a86e0d8e..f9f80aff7920 100644
@@ -203,7 +203,7 @@ static bool save_cfg_sub(struct mesh_node *node, uint16_t ele_addr,
 
 	id = (vendor) ? id : MODEL_ID(id);
 
-	if (virt)
+	if (virt && label)
 		memcpy(db_sub.addr.label, label, 16);
 
 	if (opcode == OP_CONFIG_MODEL_SUB_VIRT_DELETE ||
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=961526

---Test result---

Test Summary:

CheckPatch                    PENDING   0.29 seconds
GitLint                       PENDING   0.30 seconds
BuildEll                      PASS      20.29 seconds
BluezMake                     PASS      2594.54 seconds
MakeCheck                     PASS      20.16 seconds
MakeDistcheck                 PASS      200.64 seconds
CheckValgrind                 PASS      276.55 seconds
CheckSmatch                   PASS      303.96 seconds
bluezmakeextell               PASS      129.47 seconds
IncrementalBuild              PENDING   0.26 seconds
ScanBuild                     PASS      914.93 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 8 lines · On Fri, 9 May 2025 16:18:06 -0400 you wrote:

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

This fixes possible null pointer deference for label reported by cppcheck.

[...]

Here is the summary with links:
- [BlueZ,v1] mesh: Fix possible null pointer deference

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

You are awesome, thank you!

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