fixing the fix, just wow...

This commit is contained in:
Shikhar Bhushan
2010-06-25 22:09:51 +01:00
parent 50c42b97a3
commit 34a7b8e065

View File

@@ -332,7 +332,7 @@ public abstract class AbstractChannel
protected void receiveInto(ChannelInputStream stream, SSHPacket buf)
throws ConnectionException, TransportException {
final int len = buf.readInt();
if (len < 0 || len > getLocalMaxPacketSize() || len < buf.available())
if (len < 0 || len > getLocalMaxPacketSize() || len > buf.available())
throw new ConnectionException(DisconnectReason.PROTOCOL_ERROR, "Bad item length: " + len);
if (log.isTraceEnabled())
log.trace("IN #{}: {}", id, ByteArrayUtils.printHex(buf.array(), buf.rpos(), len));