Skip to content

Commit 68d7fb6

Browse files
PavelVPVgithub-actions[bot]
authored andcommitted
bluetooth: mesh: pb_adv: check SegN in Transaction Continuation PDU
Check that SegN is not 0. SegN = 0 is invalid as the first segment is sent in Transaction Start PDU. Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit 427cf0d)
1 parent 03db3db commit 68d7fb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/bluetooth/mesh/pb_adv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ static void gen_prov_cont(struct prov_rx *rx, struct net_buf_simple *buf)
515515
return;
516516
}
517517

518-
if (seg > link.rx.last_seg) {
518+
if (seg > link.rx.last_seg || seg == 0) {
519519
LOG_ERR("Invalid segment index %u", seg);
520520
prov_failed(PROV_ERR_NVAL_FMT);
521521
return;

0 commit comments

Comments
 (0)