--- libtorrent-0.12.9/src/protocol/handshake.h 2010-03-12 09:35:53.131686000 +0300 +++ libtorrent-0.12.9.new/src/protocol/handshake.h 2014-08-20 11:24:38.371862225 +0400 @@ -66,7 +66,7 @@ static const uint32_t enc_pad_size = 512; static const uint32_t enc_pad_read_size = 96 + enc_pad_size + 20; - static const uint32_t buffer_size = enc_pad_read_size + 20 + enc_negotiation_size + enc_pad_size + 2 + handshake_size + 5; + static const uint32_t buffer_size = (enc_pad_read_size + 20 + enc_negotiation_size + enc_pad_size + 2 + handshake_size + 5)*2; typedef ProtocolBuffer Buffer;