mirror of
https://github.com/transmission/transmission.git
synced 2026-05-08 09:39:08 +01:00
Fix bug where partially received messages data would be dropped,
causing a parse error when the rest of the message arrived.
This commit is contained in:
@@ -359,7 +359,8 @@ msg_default ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
|
||||
}
|
||||
else if( 0 < res )
|
||||
{
|
||||
if( res > [_buf length])
|
||||
assert( res <= [_buf length]);
|
||||
if( res < [_buf length])
|
||||
{
|
||||
memmove( [_buf mutableBytes], [_buf bytes] + res,
|
||||
[_buf length] - res );
|
||||
|
||||
Reference in New Issue
Block a user