Skip to content

Commit

Permalink
upstream: make sshbuf_putb(b, NULL) a no-op
Browse files Browse the repository at this point in the history
OpenBSD-Commit-ID: 976fdc99b500e347023d430df372f31c1dd128f7
  • Loading branch information
djmdjm committed Jun 5, 2020
1 parent 6979629 commit ea547eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sshbuf-getput-basic.c
@@ -1,4 +1,4 @@
/* $OpenBSD: sshbuf-getput-basic.c,v 1.10 2019/12/13 19:09:37 djm Exp $ */
/* $OpenBSD: sshbuf-getput-basic.c,v 1.11 2020/06/05 03:25:35 djm Exp $ */
/*
* Copyright (c) 2011 Damien Miller
*
Expand Down Expand Up @@ -338,6 +338,8 @@ sshbuf_put(struct sshbuf *buf, const void *v, size_t len)
int
sshbuf_putb(struct sshbuf *buf, const struct sshbuf *v)
{
if (v == NULL)
return 0;
return sshbuf_put(buf, sshbuf_ptr(v), sshbuf_len(v));
}

Expand Down

0 comments on commit ea547eb

Please sign in to comment.