Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/crypto/external/bsd/openssh/dist/sshbuf.h,v rcsdiff: /ftp/cvs/cvsroot/src/crypto/external/bsd/openssh/dist/sshbuf.h,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.6 retrieving revision 1.7 diff -u -p -r1.6 -r1.7 --- src/crypto/external/bsd/openssh/dist/sshbuf.h 2016/08/02 13:45:12 1.6 +++ src/crypto/external/bsd/openssh/dist/sshbuf.h 2016/12/25 00:07:47 1.7 @@ -1,4 +1,4 @@ -/* $OpenBSD: sshbuf.h,v 1.7 2016/05/02 08:49:03 djm Exp $ */ +/* $OpenBSD: sshbuf.h,v 1.8 2016/11/25 23:22:04 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -135,6 +135,14 @@ u_char *sshbuf_mutable_ptr(const struct int sshbuf_check_reserve(const struct sshbuf *buf, size_t len); /* + * Preallocates len additional bytes in buf. + * Useful for cases where the caller knows how many bytes will ultimately be + * required to avoid realloc in the buffer code. + * Returns 0 on success, or a negative SSH_ERR_* error code on failure. + */ +int sshbuf_allocate(struct sshbuf *buf, size_t len); + +/* * Reserve len bytes in buf. * Returns 0 on success and a pointer to the first reserved byte via the * optional dpp parameter or a negative * SSH_ERR_* error code on failure.