mirror of
https://github.com/transmission/transmission
synced 2024-12-27 01:57:52 +00:00
(trunk libT) #4173 "Crashing with r12315 in Debian" -- possible fix?
This commit is contained in:
parent
7cef8dc8a8
commit
03666d2365
1 changed files with 2 additions and 1 deletions
|
@ -1065,8 +1065,9 @@ tr_peerIoReadBytesToBuf( tr_peerIo * io, struct evbuffer * inbuf, struct evbuffe
|
||||||
struct evbuffer_iovec iovec;
|
struct evbuffer_iovec iovec;
|
||||||
evbuffer_ptr_set( outbuf, &pos, old_length, EVBUFFER_PTR_SET );
|
evbuffer_ptr_set( outbuf, &pos, old_length, EVBUFFER_PTR_SET );
|
||||||
do {
|
do {
|
||||||
evbuffer_peek( outbuf, byteCount, &pos, &iovec, 1 );
|
evbuffer_peek( outbuf, byteCount, &pos, &iovec, 1 );
|
||||||
tr_cryptoDecrypt( io->crypto, iovec.iov_len, iovec.iov_base, iovec.iov_base );
|
tr_cryptoDecrypt( io->crypto, iovec.iov_len, iovec.iov_base, iovec.iov_base );
|
||||||
|
byteCount -= iovec.iov_len;
|
||||||
} while( !evbuffer_ptr_set( outbuf, &pos, iovec.iov_len, EVBUFFER_PTR_ADD ) );
|
} while( !evbuffer_ptr_set( outbuf, &pos, iovec.iov_len, EVBUFFER_PTR_ADD ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue