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:25:29 +0200
commitc165c396de879b24f19c3a942a32795a8be351d7 (patch)
tree62eabc31c18d7c01c25ffd417ddbb2d55ec769b2 /include/libssh
parentf21ddefedb1230536b67a80efaf333664a38b54c (diff)
downloadlibssh-c165c396de879b24f19c3a942a32795a8be351d7.tar.gz
libssh-c165c396de879b24f19c3a942a32795a8be351d7.tar.xz
libssh-c165c396de879b24f19c3a942a32795a8be351d7.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>
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 d4cb071b..81d9452b 100644
--- a/include/libssh/buffer.h
+++ b/include/libssh/buffer.h
@@ -48,6 +48,8 @@ int ssh_buffer_add_u16(ssh_buffer buffer, uint16_t data);
int ssh_buffer_add_u32(ssh_buffer buffer, uint32_t data);
int ssh_buffer_add_u64(ssh_buffer buffer, uint64_t data);
+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,