[openssh-commits] [openssh] 02/04: upstream: Adjust debug message to prevent (unsigned) integer overflow.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri May 23 13:44:56 AEST 2025
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 6629eee21ca9d0a597a04dcac744a1ad882f912e
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Thu May 22 12:14:19 2025 +0000
upstream: Adjust debug message to prevent (unsigned) integer overflow.
Fixes Coverity CID 481110, ok djm@
OpenBSD-Commit-ID: 26178bf3b812707fb498ea85d076cadd1f2eb686
---
misc-agent.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc-agent.c b/misc-agent.c
index 712c42b82..cf9b0fa0c 100644
--- a/misc-agent.c
+++ b/misc-agent.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc-agent.c,v 1.4 2025/05/22 03:41:10 dtucker Exp $ */
+/* $OpenBSD: misc-agent.c,v 1.5 2025/05/22 12:14:19 dtucker Exp $ */
/*
* Copyright (c) 2025 Damien Miller <djm at mindrot.org>
*
@@ -59,7 +59,7 @@ hostname_hash(size_t len)
l = ssh_digest_bytes(SSH_DIGEST_SHA512);
if (len > 64) {
- error_f("bad length %zu > max %zd", len, l - 1);
+ error_f("bad length %zu >= max %zd", len, l);
return NULL;
}
if (gethostname(hostname, sizeof(hostname)) == -1) {
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list