summaryrefslogtreecommitdiffstats
path: root/sshbuf-getput-basic.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2014-12-04 02:49:59 +0100
committerDamien Miller <djm@mindrot.org>2014-12-04 23:29:46 +0100
commit74de254bb92c684cf53461da97f52d5ba34ded80 (patch)
tree3ef00db6b38b9cae24dc31234f341f238fc2ee03 /sshbuf-getput-basic.c
parentupstream commit (diff)
downloadopenssh-74de254bb92c684cf53461da97f52d5ba34ded80.tar.xz
openssh-74de254bb92c684cf53461da97f52d5ba34ded80.zip
upstream commit
convert KRL code to new buffer API ok markus@
Diffstat (limited to 'sshbuf-getput-basic.c')
-rw-r--r--sshbuf-getput-basic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c
index b7d0758c2..682b68d58 100644
--- a/sshbuf-getput-basic.c
+++ b/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
*
@@ -359,7 +359,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