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/QR | |
parent | b73baa1ea44d4a629478e5e6be2552c7fb8e691f (diff) |
Add assertion on the input matrix size in factorizations relying on permutations of 32bits int
Diffstat (limited to 'Eigen/src/QR')
-rw-r--r-- | Eigen/src/QR/ColPivHouseholderQR.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index 2cb255652..9ec8a65e4 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -401,6 +401,9 @@ ColPivHouseholderQR<MatrixType>& ColPivHouseholderQR<MatrixType>::compute(const Index rows = matrix.rows(); Index cols = matrix.cols(); Index size = matrix.diagonalSize(); + + // the column permutation is stored as int indices, so just to be sure: + eigen_assert(cols<=NumTraits<int>::highest()); m_qr = matrix; m_hCoeffs.resize(size); |