diff options
Diffstat (limited to 'mesh/crypto.c')
-rw-r--r-- | mesh/crypto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mesh/crypto.c b/mesh/crypto.c index 8ea906ac9..596a289f9 100644 --- a/mesh/crypto.c +++ b/mesh/crypto.c @@ -637,6 +637,9 @@ bool mesh_crypto_packet_build(bool ctl, uint8_t ttl, uint32_t hdr; size_t n; + if (seq > SEQ_MASK) + return false; + l_put_be32(seq, packet + 1); packet[1] = (ctl ? CTL : 0) | (ttl & TTL_MASK); |