summaryrefslogtreecommitdiff
path: root/mesh
diff options
context:
space:
mode:
authorBrian Gix <brian.gix@intel.com>2021-03-24 12:34:12 -0700
committerBrian Gix <brian.gix@intel.com>2021-03-25 16:18:04 -0700
commitf6eccfa66baf9897b805a5749a489a13ca7cd96a (patch)
tree4e783b54e22a93d46ba4095bda255def24337ea6 /mesh
parent03987faa52806511bed3d199bb77cfa22be39679 (diff)
downloadbluez-f6eccfa66baf9897b805a5749a489a13ca7cd96a.tar.gz
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.
Diffstat (limited to 'mesh')
-rw-r--r--mesh/net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesh/net.c b/mesh/net.c
index 6acd9bc7b..aa220f762 100644
--- a/mesh/net.c
+++ b/mesh/net.c
@@ -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);