summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/sshbuf-getput-basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/sshbuf-getput-basic.c')
-rw-r--r--usr.bin/ssh/sshbuf-getput-basic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/sshbuf-getput-basic.c b/usr.bin/ssh/sshbuf-getput-basic.c
index 50a1bbb06e8..8c9e9c5175a 100644
--- a/usr.bin/ssh/sshbuf-getput-basic.c
+++ b/usr.bin/ssh/sshbuf-getput-basic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshbuf-getput-basic.c,v 1.1 2014/04/30 05:29:56 djm Exp $ */
+/* $OpenBSD: sshbuf-getput-basic.c,v 1.2 2014/12/04 01:49:59 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
@@ -357,7 +357,7 @@ sshbuf_put_string(struct sshbuf *buf, const void *v, size_t len)
int
sshbuf_put_cstring(struct sshbuf *buf, const char *v)
{
- return sshbuf_put_string(buf, (u_char *)v, strlen(v));
+ return sshbuf_put_string(buf, (u_char *)v, v == NULL ? 0 : strlen(v));
}
int