Moved the check that the amount of data is larger than the blocksize to
only get done on the first block. Based on the bug report #1826989 https://sourceforge.net/tracker/?func=detail&atid=703942&aid=1826989&group_id=125852
This commit is contained in:
parent
371a795443
commit
030b670e2a
@ -367,16 +367,19 @@ libssh2_packet_read(LIBSSH2_SESSION * session)
|
||||
/* how much data to deal with from the buffer */
|
||||
numbytes = remainbuf;
|
||||
|
||||
if (numbytes < blocksize) {
|
||||
/* we can't act on anything less than blocksize */
|
||||
return PACKET_EAGAIN;
|
||||
}
|
||||
|
||||
if (!p->total_num) {
|
||||
/* No payload package area allocated yet. To know the
|
||||
size of this payload, we need to decrypt the first
|
||||
blocksize data. */
|
||||
|
||||
if (numbytes < blocksize) {
|
||||
/* we can't act on anything less than blocksize, but this
|
||||
check is only done for the initial block since once we have
|
||||
got the start of a block we can in fact deal with fractions
|
||||
*/
|
||||
return PACKET_EAGAIN;
|
||||
}
|
||||
|
||||
if (encrypted) {
|
||||
rc = decrypt(session, &p->buf[p->readidx], block, blocksize);
|
||||
if (rc != PACKET_NONE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user