Skip to content

Commit

Permalink
upstream: fix off-by-one comparison for PerSourcePenalty
Browse files Browse the repository at this point in the history
OpenBSD-Commit-ID: af4f5d01c41ef870b23e55655bfbf73474a6c02b
  • Loading branch information
djmdjm committed Jun 11, 2024
1 parent 82c836d commit fc4e96b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srclimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ srclimit_penalty_check_allow(int sock, const char **reason)
return 1;
}
}
if (npenalties > (size_t)penalty_cfg.max_sources &&
if (npenalties >= (size_t)penalty_cfg.max_sources &&
penalty_cfg.overflow_mode == PER_SOURCE_PENALTY_OVERFLOW_DENY_ALL) {
*reason = "too many penalised addresses";
return 0;
Expand Down

0 comments on commit fc4e96b

Please sign in to comment.