diff options
Diffstat (limited to 'sshbuf-getput-basic.c')
-rw-r--r-- | sshbuf-getput-basic.c | 4 |
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 @@ | |||
1 | /* $OpenBSD: sshbuf-getput-basic.c,v 1.1 2014/04/30 05:29:56 djm Exp $ */ | 1 | /* $OpenBSD: sshbuf-getput-basic.c,v 1.2 2014/12/04 01:49:59 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2011 Damien Miller | 3 | * Copyright (c) 2011 Damien Miller |
4 | * | 4 | * |
@@ -359,7 +359,7 @@ sshbuf_put_string(struct sshbuf *buf, const void *v, size_t len) | |||
359 | int | 359 | int |
360 | sshbuf_put_cstring(struct sshbuf *buf, const char *v) | 360 | sshbuf_put_cstring(struct sshbuf *buf, const char *v) |
361 | { | 361 | { |
362 | return sshbuf_put_string(buf, (u_char *)v, strlen(v)); | 362 | return sshbuf_put_string(buf, (u_char *)v, v == NULL ? 0 : strlen(v)); |
363 | } | 363 | } |
364 | 364 | ||
365 | int | 365 | int |