Skip to content

Commit

Permalink
Merge #19739
Browse files Browse the repository at this point in the history
19739: gnrc/rpl: fix incorrect addition overflow check r=maribu a=szsam




Co-authored-by: Mingjie Shen <[email protected]>
  • Loading branch information
bors[bot] and szsam authored Jun 17, 2023
2 parents 5d32c95 + fe92f67 commit 5bc5d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/net/gnrc/routing/rpl/of0.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ uint16_t calc_rank(gnrc_rpl_dodag_t *dodag, uint16_t base_rank)
add = CONFIG_GNRC_RPL_DEFAULT_MIN_HOP_RANK_INCREASE;
}

if ((base_rank + add) < base_rank) {
if ((uint16_t)(base_rank + add) < base_rank) {
return GNRC_RPL_INFINITE_RANK;
}

Expand Down

0 comments on commit 5bc5d70

Please sign in to comment.