[openssh-commits] [openssh] 02/05: upstream: fix sshbuf_dtourlb64() to not choke on empty buffers;
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Sep 4 13:06:39 AEST 2025
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit e3699ff47df336f57da2e78188d0057f8368af56
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Thu Sep 4 00:32:31 2025 +0000
upstream: fix sshbuf_dtourlb64() to not choke on empty buffers;
previously it incorrectly returned an error in this situation; ok deraadt
OpenBSD-Commit-ID: e62773d6e8cb95a19aab54f0af0edbcd47b345c0
---
sshbuf-misc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sshbuf-misc.c b/sshbuf-misc.c
index bc92866db..431809d90 100644
--- a/sshbuf-misc.c
+++ b/sshbuf-misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshbuf-misc.c,v 1.21 2025/07/24 05:44:55 djm Exp $ */
+/* $OpenBSD: sshbuf-misc.c,v 1.22 2025/09/04 00:32:31 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -212,6 +212,9 @@ sshbuf_dtourlb64(const struct sshbuf *d, struct sshbuf *b64, int wrap)
struct sshbuf *b = NULL;
size_t i, l;
+ if (sshbuf_len(d) == 0)
+ return 0;
+
if ((b = sshbuf_new()) == NULL)
return SSH_ERR_ALLOC_FAIL;
/* Encode using regular base64; we'll transform it once done */
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list