snowyu / libtorrent

Automatically exported from code.google.com/p/libtorrent
Other
1 stars 0 forks source link

number overflow in peer_connection.cpp #668

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
this is trunk

i got an overflow in peer_connection.cpp 4572 because m_desired_queue_size is 
only unsigned char. if the download rate exceeds
~1.4MBytes/s with 3s queue time the result will be greater than 255.
(thx to VCs smaller type check option)

m_desired_queue_size = queue_time * download_rate / block_size;

if (m_desired_queue_size > m_max_out_request_queue)
...

Original issue reported on code.google.com by webmas...@massaroddel.de on 25 Aug 2014 at 7:49

GoogleCodeExporter commented 9 years ago
thanks. This is an issue in current 0.16.x too.

Original comment by arvid.no...@gmail.com on 26 Aug 2014 at 2:45

GoogleCodeExporter commented 9 years ago
fixed in all active branches.

Original comment by arvid.no...@gmail.com on 26 Aug 2014 at 3:14