2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

* src/MSEHandshake.cc (encryptAndSendData): Use std::min().
pull/1/head
Tatsuhiro Tsujikawa 2008-02-18 17:13:20 +00:00
parent 3c41ea24bf
commit 1d0175a29e
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
* src/MSEHandshake.cc (encryptAndSendData): Use std::min().
2008-02-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Determin _threadtholdSpeed in each constructor for

View File

@ -196,7 +196,7 @@ void MSEHandshake::encryptAndSendData(const unsigned char* data, size_t length)
size_t s;
size_t r = length;
while(r > 0) {
s = r > sizeof(temp)?sizeof(temp):r;
s = std::min(r, sizeof(temp));
_encryptor->encrypt(temp, s, dptr, s);
_socket->writeData(temp, s);
dptr += s;