Array boundary exceeding in stats_alert::message() with
TORRENT_DISABLE_FULL_STATS define
What steps will reproduce the problem?
Build libtorrent with TORRENT_DISABLE_FULL_STATS
What version of the product are you using? On what operating system?
libtorrent-rasterbar-1.0.4
MS VS 2013 update 4
(Win 8.1 64)
Please provide any additional information below.
'libtorrent/src/alert.cpp'
std::string stats_alert::message() const
snprintf(msg, sizeof(msg), "%s: [%d] %d %d %d %d %d %d %d %d %d %d"
...
, transferred[0]
...
, transferred[9]);
Access to 10 elements of the array
But array size depends on TORRENT_DISABLE_FULL_STATS define
'include/libtorrent/alert_types.hpp'
enum stats_channel
{
...
#ifndef TORRENT_DISABLE_FULL_STATS
...
#endif
num_channels
};
int transferred[num_channels];
With TORRENT_DISABLE_FULL_STATS: num_channels = 5
Original issue reported on code.google.com by rominmai...@gmail.com on 9 Apr 2015 at 10:18
Original issue reported on code.google.com by
rominmai...@gmail.com
on 9 Apr 2015 at 10:18