aboutsummaryrefslogtreecommitdiff
path: root/include
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:12:27 +0200
commit34bdc1ca7871e8e9258077411edd516c8de55299 (patch)
treede8b1ba34e737e608e76a28f6780daf80b6a2721 /include
parent5f202d7ffa48f2ee989e0e6c1e761963c68ab08f (diff)
downloadlibssh-34bdc1ca7871e8e9258077411edd516c8de55299.tar.gz
libssh-34bdc1ca7871e8e9258077411edd516c8de55299.tar.xz
libssh-34bdc1ca7871e8e9258077411edd516c8de55299.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')
-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,