diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-02-18 11:29:54 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-02-18 11:29:54 +0100 |
commit | 63464754ef747e0c3d16c5da6fd4d4228ab8dd7a (patch) | |
tree | df3751a3019ef58b05e41d99cc633a298261f9db | |
parent | eb563049f7041170976998273e4d48e96b11b08f (diff) |
Add an internal assertion in makeCompressed to catch a possible risk of null-pointer access.
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrix.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Eigen/src/SparseCore/SparseMatrix.h b/Eigen/src/SparseCore/SparseMatrix.h index 4c8965802..4562f3df9 100644 --- a/Eigen/src/SparseCore/SparseMatrix.h +++ b/Eigen/src/SparseCore/SparseMatrix.h @@ -467,6 +467,8 @@ class SparseMatrix if(isCompressed()) return; + eigen_internal_assert(m_outerIndex!=0 && m_outerSize>0); + Index oldStart = m_outerIndex[1]; m_outerIndex[1] = m_innerNonZeros[0]; for(Index j=1; j<m_outerSize; ++j) |