[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] client: update max protocol exchange size


RFC4253 in section 4.2. (Protocol Version Exchange) defines maximum size of 255
characters.

Signed-off-by: Luka Perkov <luka.perkov@xxxxxxxxxx>
---
 src/client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/client.c b/src/client.c
index af525c1..c4ea60b 100644
--- a/src/client.c
+++ b/src/client.c
@@ -126,7 +126,7 @@ static int callback_receive_banner(const void *data, size_t len, void *user) {
 
   		return ret;
   	}
-  	if(i>127){
+  	if(i>255){
   		/* Too big banner */
   		session->session_state=SSH_SESSION_STATE_ERROR;
   		ssh_set_error(session,SSH_FATAL,"Receiving banner: too large banner");
-- 
1.9.1


Follow-Ups:
Re: [PATCH] client: update max protocol exchange sizeAlan Dunn <amdunn@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org