Skip to content

Commit

Permalink
Vectors resized to prevent bounds-checking assertion failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsonst committed Mar 1, 2022
1 parent 1fd8f7f commit 82bce3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/XrdThrottle/XrdThrottleManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ XrdThrottleManager::Init()
{
TRACE(DEBUG, "Initializing the throttle manager.");
// Initialize all our shares to zero.
m_primary_bytes_shares.reserve(m_max_users);
m_secondary_bytes_shares.reserve(m_max_users);
m_primary_ops_shares.reserve(m_max_users);
m_secondary_ops_shares.reserve(m_max_users);
m_primary_bytes_shares.resize(m_max_users);
m_secondary_bytes_shares.resize(m_max_users);
m_primary_ops_shares.resize(m_max_users);
m_secondary_ops_shares.resize(m_max_users);
// Allocate each user 100KB and 10 ops to bootstrap;
for (int i=0; i<m_max_users; i++)
{
Expand Down

0 comments on commit 82bce3e

Please sign in to comment.