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_channel_process_startup: Fix unexpected bytes remain after decoding #12

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

logmanoriginal
Copy link
Owner

@logmanoriginal logmanoriginal commented Oct 9, 2024

When libssh2_channel_process_startup is called with an empty message, libssh2 only checks whether the message pointer is not NULL and does not check if message_len is zero. This results in extra bytes being added to the message, resulting in an error on the server side.

This is fixed by providing NULL for message when the message length is zero.

References #9

…coding

When libssh2_channel_process_startup is called with an empty message,
libssh2 only checks whether the message pointer is not NULL and does
not check if message_len is zero. This results in extra bytes being
added to the message, resulting in an error on the server side.

This is fixed by providing NULL for message when the message length
is zero.
@logmanoriginal logmanoriginal merged commit 4612afc into main Oct 9, 2024
1 check passed
@logmanoriginal logmanoriginal deleted the libssh2_channel_shell branch October 9, 2024 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant