[openssh-commits] [openssh] 08/09: upstream: fix off-by-one comparison for PerSourcePenalty

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 11 11:27:06 AEST 2024


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit fc4e96b2174d6a894d2033421699d091679baced
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Jun 11 01:22:25 2024 +0000

    upstream: fix off-by-one comparison for PerSourcePenalty
    
    OpenBSD-Commit-ID: af4f5d01c41ef870b23e55655bfbf73474a6c02b
---
 srclimit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srclimit.c b/srclimit.c
index bac8ef66..6b8af4fb 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;

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list