From 6f4463e81f7aab8b04cc7479bd18dc800534b961 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Jul 2009 22:54:18 +0200 Subject: [PATCH] remove superfluous check for large packets as we're already doing the correct check further down anyway there's no point in doing the (wrong) check further up as well. Paul Veldkamp pointed this out. --- src/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transport.c b/src/transport.c index 5c2a16c..19083f9 100644 --- a/src/transport.c +++ b/src/transport.c @@ -431,7 +431,7 @@ _libssh2_transport_read(LIBSSH2_SESSION * session) * and we can extract packet and padding length from it */ p->packet_length = _libssh2_ntohu32(block); - if ((p->packet_length < 1) || (p->packet_length > PACKETBUFSIZE)) + if (p->packet_length < 1) return PACKET_FAIL; p->padding_length = block[4];