summaryrefslogtreecommitdiff
path: root/sshbuf-getput-basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshbuf-getput-basic.c')
-rw-r--r--sshbuf-getput-basic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshbuf-getput-basic.c b/sshbuf-getput-basic.c
index d401a7265..da834d008 100644
--- a/sshbuf-getput-basic.c
+++ b/sshbuf-getput-basic.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshbuf-getput-basic.c,v 1.9 2019/09/06 04:53:27 djm Exp $ */ 1/* $OpenBSD: sshbuf-getput-basic.c,v 1.10 2019/12/13 19:09:37 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2011 Damien Miller 3 * Copyright (c) 2011 Damien Miller
4 * 4 *
@@ -535,6 +535,9 @@ sshbuf_put_cstring(struct sshbuf *buf, const char *v)
535int 535int
536sshbuf_put_stringb(struct sshbuf *buf, const struct sshbuf *v) 536sshbuf_put_stringb(struct sshbuf *buf, const struct sshbuf *v)
537{ 537{
538 if (v == NULL)
539 return sshbuf_put_string(buf, NULL, 0);
540
538 return sshbuf_put_string(buf, sshbuf_ptr(v), sshbuf_len(v)); 541 return sshbuf_put_string(buf, sshbuf_ptr(v), sshbuf_len(v));
539} 542}
540 543