From 21f67ef9427cee743b3b21492863296814806140 Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Mon, 3 Feb 2025 07:12:42 -1000 Subject: [PATCH] out of bounds fixes --- src/math/lp/dioph_eq.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/math/lp/dioph_eq.cpp b/src/math/lp/dioph_eq.cpp index d0537c669..d2f69926a 100644 --- a/src/math/lp/dioph_eq.cpp +++ b/src/math/lp/dioph_eq.cpp @@ -926,6 +926,7 @@ namespace lp { } find_changed_terms_and_more_changed_rows(); for (unsigned j : m_changed_terms) { + if (j >= m_l_matrix.column_count()) continue; for (const auto & cs: m_l_matrix.column(j)) { m_changed_rows.insert(cs.var()); } @@ -1328,6 +1329,7 @@ namespace lp { lia_move ret = lia_move::undef; for (unsigned j : m_changed_terms) { cleanup.push_back(j); + if (j >= lra.column_count()) continue; if (!lra.column_has_term(j) || lra.column_is_free(j) || is_fixed(j) || !lia.column_is_int(j)) { continue;