1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

client: Fix maximum banner length

According to RFC 4253 the max banner length is 255.

Thanks to Saju Panikulam <spanikulam@ipswitch.com> for the report.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Andreas Schneider
2016-05-02 09:15:28 +02:00
parent 22799b107d
commit cb52ed7b12

View File

@@ -145,7 +145,8 @@ static int callback_receive_banner(const void *data, size_t len, void *user)
break;
}
}
if (i > 127) {
/* According to RFC 4253 the max banner length is 255 */
if (i > 255) {
/* Too big banner */
session->session_state=SSH_SESSION_STATE_ERROR;
ssh_set_error(session,