diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-04-21 16:49:28 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2016-04-21 16:49:28 -0700 |
commit | a3256d78d849b6978356a587038c3c62d4437bc9 (patch) | |
tree | 37f7f98e1122a8393319fc72082d0c3ac0ee20c1 /Eigen/src/QR | |
parent | 50968a0a3ed2686b25f6df1687f4cf7fc6b66da1 (diff) |
Prevent crash in CompleteOrthogonalDecomposition if object was default constructed.
Diffstat (limited to 'Eigen/src/QR')
-rw-r--r-- | Eigen/src/QR/CompleteOrthogonalDecomposition.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Eigen/src/QR/CompleteOrthogonalDecomposition.h b/Eigen/src/QR/CompleteOrthogonalDecomposition.h index e71944fd7..230d0d23c 100644 --- a/Eigen/src/QR/CompleteOrthogonalDecomposition.h +++ b/Eigen/src/QR/CompleteOrthogonalDecomposition.h @@ -397,6 +397,10 @@ CompleteOrthogonalDecomposition<MatrixType>& CompleteOrthogonalDecomposition< const Index rank = m_cpqr.rank(); const Index cols = matrix.cols(); + const Index rows = matrix.rows(); + m_zCoeffs.resize((std::min)(rows, cols)); + m_temp.resize(cols); + if (rank < cols) { // We have reduced the (permuted) matrix to the form // [R11 R12] |