1
0
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:
Michael Buckley
2022-05-06 08:40:19 -07:00
committed by GitHub
parent dba9ad9d3d
commit 4b057bd2d9
3 changed files with 19 additions and 0 deletions

View File

@@ -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,