[openssh-commits] [openssh] 09/09: upstream: a little more RB_TREE paranoia

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 11 11:27:07 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 ef878d58798f6688c7f4d4e417dc0c29023ea831
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Tue Jun 11 01:23:25 2024 +0000

    upstream: a little more RB_TREE paranoia
    
    OpenBSD-Commit-ID: 8dc2fd21eebd8830c4a4d25461ac4fe228e11156
---
 srclimit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srclimit.c b/srclimit.c
index 6b8af4fb..962af73f 100644
--- a/srclimit.c
+++ b/srclimit.c
@@ -295,14 +295,14 @@ srclimit_remove_expired_penalties(void)
 	while (npenalties > (size_t)penalty_cfg.max_sources) {
 		if ((p = RB_MIN(penalties_by_expiry,
 		    &penalties_by_expiry)) == NULL)
-			break; /* shouldn't happen */
+			fatal_f("internal error: penalty tables corrupt (find)");
 		bits = p->addr.af == AF_INET ? ipv4_masklen : ipv6_masklen;
 		addr_masklen_ntop(&p->addr, bits, s, sizeof(s));
 		debug3_f("overflow, remove %s", s);
 		if (RB_REMOVE(penalties_by_expiry,
 		    &penalties_by_expiry, p) != p ||
 		    RB_REMOVE(penalties_by_addr, &penalties_by_addr, p) != p)
-			fatal_f("internal error: penalty tables corrupt");
+			fatal_f("internal error: penalty tables corrupt (remove)");
 		free(p);
 		npenalties--;
 	}

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


More information about the openssh-commits mailing list