Unverified Commit 60b90ece authored by trilinos-autotester's avatar trilinos-autotester Committed by GitHub
Browse files

Merge Pull Request #5110 from etphipp/Trilinos/nox_lapack_size_fix

Automatically Merged using Trilinos Pull Request AutoTester
PR Title: NOX:  Fix possible overflow when computing matrix size in NOX::LAPACK::Matrix
PR Author: etphipp
parents 324c3f7d b4b6fc6b
......@@ -72,7 +72,9 @@ namespace NOX {
Matrix() : p(0), q(0), entries() {}
//! Create a m x n matrix with all entries zero
Matrix(int m, int n) : p(m), q(n), entries(m*n) {}
Matrix(int m, int n) :
// Compute size as size_t to avoid overflow for large matrices.
p(m), q(n), entries(size_t(m)*size_t(n)) {}
//! Copy constructor
Matrix(const Matrix& a) :
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment