Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_libssh2_check_length() : additional bounds check #348

merged 1 commit into from Apr 1, 2019
Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

_libssh2_check_length() : additional bounds check

Misc.c : _libssh2_check_length()

Ensure the requested length is less than the total length before doing the additional bounds check
  • Loading branch information...
willco007 committed Apr 1, 2019
commit 08ef9b76dbeb3b71cc5739d5518159651d180520
@@ -811,6 +811,9 @@ int _libssh2_get_bignum_bytes(struct string_buf *buf, unsigned char **outbuf)

int _libssh2_check_length(struct string_buf *buf, size_t len)
if(len > buf->len)
return 0;

return ((int)(buf->dataptr - buf->data) <= (int)(buf->len - len)) ? 1 : 0;

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.