Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54514 - trunk/boost/graph
From: ngedmond_at_[hidden]
Date: 2009-06-29 20:46:16


Author: ngedmond
Date: 2009-06-29 20:46:16 EDT (Mon, 29 Jun 2009)
New Revision: 54514
URL: http://svn.boost.org/trac/boost/changeset/54514

Log:
Added a check to make sure edge source indices are in range for in-place CSR ctor

refs #3134

Text files modified:
   trunk/boost/graph/compressed_sparse_row_graph.hpp | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: trunk/boost/graph/compressed_sparse_row_graph.hpp
==============================================================================
--- trunk/boost/graph/compressed_sparse_row_graph.hpp (original)
+++ trunk/boost/graph/compressed_sparse_row_graph.hpp 2009-06-29 20:46:16 EDT (Mon, 29 Jun 2009)
@@ -829,6 +829,7 @@
     m_rowstart.clear();
     m_rowstart.resize(numverts + 1);
     for (size_t i = 0; i < numedges; ++i) {
+ assert(get(global_to_local, sources[i]) < numverts);
       ++m_rowstart[get(global_to_local, sources[i]) + 1];
     }
     // 2. Do a prefix sum on those to get starting positions of each row


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk