Skip to content

Commit f1eb157

Browse files
assert
1 parent 9c296dc commit f1eb157

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

libcanard/canard.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,6 +1612,7 @@ static void node_id_occupancy_update(canard_t* const self, const byte_t src)
16121612
(bitmap_test(self->node_id_occupancy_bitmap, src) && (self->node_id != src))) {
16131613
return;
16141614
}
1615+
CANARD_ASSERT(src <= CANARD_NODE_ID_MAX);
16151616

16161617
// Update the node-ID occupancy bitmap. We cannot detect departures of an individual node, so in the presence of
16171618
// churn the slots will be eventually exhausted. We mitigate this by applying probabilistic purge once the

0 commit comments

Comments
 (0)