1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-15 16:29:34 +00:00

#620: assertion failure: `pad_d_len <= 512' in handshake.c:527

This commit is contained in:
Charles Kerr 2008-01-14 16:17:02 +00:00
parent 14a327a47d
commit 925153e67b

View file

@ -524,7 +524,14 @@ readCryptoSelect( tr_handshake * handshake, struct evbuffer * inbuf )
tr_peerIoReadUint16( handshake->io, inbuf, &pad_d_len );
dbgmsg( handshake, "pad_d_len is %d", (int)pad_d_len );
assert( pad_d_len <= 512 );
if( pad_d_len > 512 )
{
dbgmsg( handshake, "encryption handshake: pad_d_len is too long" );
tr_handshakeDone( handshake, FALSE );
return READ_DONE;
}
handshake->pad_d_len = pad_d_len;
setState( handshake, AWAITING_PAD_D );