aboutsummaryrefslogtreecommitdiff
path: root/include/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2017-02-23 16:22:04 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-04-13 16:27:33 +0200
commit5e63b40cde9b298b0a55a405551dd1d858e9ab18 (patch)
tree765518c3b106f7eb2c01da9522df02713e0fa708 /include/libssh
parent7b8b5eb4eac314a3a29be812bef0264c6611f6e7 (diff)
downloadlibssh-5e63b40cde9b298b0a55a405551dd1d858e9ab18.tar.gz
libssh-5e63b40cde9b298b0a55a405551dd1d858e9ab18.tar.xz
libssh-5e63b40cde9b298b0a55a405551dd1d858e9ab18.zip
buffer: Create ssh_buffer_validate_length()
This functions allows if a given length can be obtained from the buffer. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit c165c396de879b24f19c3a942a32795a8be351d7)
Diffstat (limited to 'include/libssh')
-rw-r--r--include/libssh/buffer.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h
index 826d0b7c..ee3f8cc7 100644
--- a/include/libssh/buffer.h
+++ b/include/libssh/buffer.h
@@ -53,6 +53,8 @@ int buffer_add_u32(ssh_buffer buffer, uint32_t data);
int buffer_add_u64(ssh_buffer buffer, uint64_t data);
int ssh_buffer_add_data(ssh_buffer buffer, const void *data, uint32_t len);
+int ssh_buffer_validate_length(struct ssh_buffer_struct *buffer, size_t len);
+
int ssh_buffer_pack_va(struct ssh_buffer_struct *buffer,
const char *format,
int argc,