diff options
author | djm@openbsd.org <djm@openbsd.org> | 2024-06-11 03:22:25 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-06-11 03:26:52 +0200 |
commit | fc4e96b2174d6a894d2033421699d091679baced (patch) | |
tree | 310f1c5ab37daed86f6bb3e714d2c4f2abb904f1 /srclimit.c | |
parent | upstream: move tree init before possible early return (diff) | |
download | openssh-fc4e96b2174d6a894d2033421699d091679baced.tar.xz openssh-fc4e96b2174d6a894d2033421699d091679baced.zip |
upstream: fix off-by-one comparison for PerSourcePenalty
OpenBSD-Commit-ID: af4f5d01c41ef870b23e55655bfbf73474a6c02b
Diffstat (limited to 'srclimit.c')
-rw-r--r-- | srclimit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/srclimit.c b/srclimit.c index bac8ef667..6b8af4fb1 100644 --- a/srclimit.c +++ b/srclimit.c @@ -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; |