diff options
author | Gael Guennebaud <g.gael@free.fr> | 2013-02-26 11:42:32 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2013-02-26 11:42:32 +0100 |
commit | 5dda7842ca66c7a81b703734bc7bd8cef11a6d7b (patch) | |
tree | 769a905d52c8cf3bcf498fcbdc87b97fe3bd7f2e /Eigen/src/LU/FullPivLU.h | |
parent | b73baa1ea44d4a629478e5e6be2552c7fb8e691f (diff) |
Add assertion on the input matrix size in factorizations relying on permutations of 32bits int
Diffstat (limited to 'Eigen/src/LU/FullPivLU.h')
-rw-r--r-- | Eigen/src/LU/FullPivLU.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 14a9c402d..dfe25f424 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -417,6 +417,9 @@ FullPivLU<MatrixType>::FullPivLU(const MatrixType& matrix) template<typename MatrixType> FullPivLU<MatrixType>& FullPivLU<MatrixType>::compute(const MatrixType& matrix) { + // the permutations are stored as int indices, so just to be sure: + eigen_assert(matrix.rows()<=NumTraits<int>::highest() && matrix.cols()<=NumTraits<int>::highest()); + m_isInitialized = true; m_lu = matrix; |