mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
Ensure KEX replies don't include extra bytes (#696)
Addresses #695 Credit: Michael Buckley, reported by Harry Sintonen
This commit is contained in:
@@ -880,6 +880,12 @@ int _libssh2_check_length(struct string_buf *buf, size_t len)
|
||||
return ((len <= left) && (left <= buf->len));
|
||||
}
|
||||
|
||||
int _libssh2_eob(struct string_buf *buf)
|
||||
{
|
||||
unsigned char *endp = &buf->data[buf->len];
|
||||
return buf->dataptr >= endp;
|
||||
}
|
||||
|
||||
/* Wrappers */
|
||||
|
||||
int _libssh2_bcrypt_pbkdf(const char *pass,
|
||||
|
||||
Reference in New Issue
Block a user