update boundaries checking code to be slightly tigher

This commit is contained in:
Peter Thorson
2014-12-05 21:02:07 -05:00
parent b9d4187e38
commit f9ff42c4b0
+1 -1
View File
@@ -780,7 +780,7 @@ void connection<config>::handle_read_handshake(lib::error_code const & ec,
// More paranoid boundaries checking.
// TODO: Is this overkill?
if (bytes_processed > config::connection_read_buffer_size) {
if (bytes_processed > bytes_transferred) {
m_elog.write(log::elevel::fatal,"Fatal boundaries checking error.");
this->terminate(make_error_code(error::general));
return;