mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +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:
@@ -145,7 +145,8 @@ static int callback_receive_banner(const void *data, size_t len, void *user)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (i > 127) {
|
/* According to RFC 4253 the max banner length is 255 */
|
||||||
|
if (i > 255) {
|
||||||
/* Too big banner */
|
/* Too big banner */
|
||||||
session->session_state=SSH_SESSION_STATE_ERROR;
|
session->session_state=SSH_SESSION_STATE_ERROR;
|
||||||
ssh_set_error(session,
|
ssh_set_error(session,
|
||||||
|
|||||||
Reference in New Issue
Block a user