[openssh-commits] [openssh] 03/08: upstream: allow sshbuf_put_stringb(buf, NULL); ok markus@
git+noreply at mindrot.org
git+noreply at mindrot.org
Sat Dec 14 08:41:06 AEDT 2019
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 612b1dd1ec91ffb1e01f58cca0c6eb1d47bf4423
Author: djm at openbsd.org <djm at openbsd.org>
Date: Fri Dec 13 19:09:37 2019 +0000
upstream: allow sshbuf_put_stringb(buf, NULL); ok markus@
OpenBSD-Commit-ID: 91482c1ada9adb283165d48dafbb88ae91c657bd
---
sshbuf-getput-basic.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c
index d401a726..da834d00 100644
--- a/sshbuf-getput-basic.c
+++ b/sshbuf-getput-basic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshbuf-getput-basic.c,v 1.9 2019/09/06 04:53:27 djm Exp $ */
+/* $OpenBSD: sshbuf-getput-basic.c,v 1.10 2019/12/13 19:09:37 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -535,6 +535,9 @@ sshbuf_put_cstring(struct sshbuf *buf, const char *v)
int
sshbuf_put_stringb(struct sshbuf *buf, const struct sshbuf *v)
{
+ if (v == NULL)
+ return sshbuf_put_string(buf, NULL, 0);
+
return sshbuf_put_string(buf, sshbuf_ptr(v), sshbuf_len(v));
}
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list