Skip to contentSkip to conversation

mesh: Fix segmented msg RX with friendship

PATCH In review Brian Gix 2 participants 2 messages Mar 24, 2021 Bluetooth drivers

lore
Share & tools
lore

Brian Gix

author
#0 lore raw

PATCH 1/1 mesh: Fix segmented msg RX with friendship

This fixes an uninitialized memory issue where a message received for a local node is silently discarded if an uninitialized boolean is mistakenly set to TRUE, when friendships exist.

---
 mesh/net.c | 1 +
 1 file changed, 1 insertion(+)
mesh/net.c +1 -0
index 6acd9bc7b..aa220f762 100644
@@ -1165,6 +1165,7 @@ static struct mesh_friend_msg *mesh_friend_msg_new(uint8_t seg_max)
 
 		size += (seg_max + 1) * sizeof(struct mesh_friend_seg_12);
 		frnd_msg = l_malloc(size);
+		memset(frnd_msg, 0, size);
 	} else
 		frnd_msg = l_new(struct mesh_friend_msg, 1);
 
Signature · 1 line
2.25.4
#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=454865

---Test result---

##############################
Test: CheckPatch - PASS

##############################
Test: CheckGitLint - PASS

##############################
Test: CheckBuild - PASS

##############################
Test: MakeCheck - PASS

---
Regards,
Linux Bluetooth