upstream commit

convert KRL code to new buffer API

ok markus@
This commit is contained in:
2014-12-05 09:29:46 +11:00
committed by Damien Miller
parent db995f2eed
commit 74de254bb9
3 changed files with 358 additions and 337 deletions
+2 -2
View File
@@ -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