diff options
author | Brian Gix <brian.gix@intel.com> | 2020-05-22 11:40:40 -0700 |
---|---|---|
committer | Brian Gix <brian.gix@intel.com> | 2020-05-22 13:54:39 -0700 |
commit | 29d737730a891f7f249c76f13fa0f3e8e09ae7e2 (patch) | |
tree | 519482bd42260e09aab1746c919c0359d9661bb8 /mesh/crypto.c | |
parent | ebed46f05ec6a42149d6954d064d27323a0d81f2 (diff) | |
download | bluez-29d737730a891f7f249c76f13fa0f3e8e09ae7e2.tar.gz |
mesh: Fix using uninitialized bytes
Fixes two problems found with static analysis
Diffstat (limited to 'mesh/crypto.c')
-rw-r--r-- | mesh/crypto.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mesh/crypto.c b/mesh/crypto.c index 99536594b..70b96c51b 100644 --- a/mesh/crypto.c +++ b/mesh/crypto.c @@ -553,6 +553,7 @@ bool mesh_crypto_packet_build(bool ctl, uint8_t ttl, if (seq > SEQ_MASK) return false; + packet[0] = 0; l_put_be32(seq, packet + 1); packet[1] = (ctl ? CTL : 0) | (ttl & TTL_MASK); |