1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

*maybe* fix the crash reported by pea_ in the forums and by Gimp in http://pastebin.ca/777952

This commit is contained in:
Charles Kerr 2007-11-19 04:44:14 +00:00
parent b0f5ff96f3
commit aa11440755

View file

@ -446,7 +446,7 @@ void
tr_peerIoWriteBytes( tr_peerIo * io,
struct evbuffer * outbuf,
const void * bytes,
int byteCount )
size_t byteCount )
{
uint8_t * tmp;
@ -502,9 +502,9 @@ void
tr_peerIoReadBytes( tr_peerIo * io,
struct evbuffer * inbuf,
void * bytes,
int byteCount )
size_t byteCount )
{
assert( (int)EVBUFFER_LENGTH( inbuf ) >= byteCount );
assert( EVBUFFER_LENGTH( inbuf ) >= byteCount );
switch( io->encryptionMode )
{
@ -553,7 +553,7 @@ tr_peerIoReadUint32( tr_peerIo * io,
void
tr_peerIoDrain( tr_peerIo * io,
struct evbuffer * inbuf,
int byteCount )
size_t byteCount )
{
uint8_t * tmp = tr_new( uint8_t, byteCount );
tr_peerIoReadBytes( io, inbuf, tmp, byteCount );