mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 15:50:57 +03:00
If ChannelOutputStream.write(byte[], int, int) was called with a buffer larger than bufferSize the loop in that method would call DataBuffer.write with a small len and a large off. This would cause the calculation in line 90 to return a negative n leading to a ArrayIndexOutOfBounds. The offset should not be taken into account when calculating the number of bytes to put in the buffer.