mirror of
https://github.com/Z3Prover/z3
synced 2026-05-26 03:46:22 +00:00
Fix off-by-one vulnerabilities: use range-based for on goals; cache loop bound
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
093e227689
commit
dbd7cd7414
6 changed files with 4 additions and 222 deletions
|
|
@ -103,7 +103,7 @@ void ackr_model_converter::convert_constants(model * source, model * destination
|
|||
evaluator.set_model_completion(true);
|
||||
array_util autil(m);
|
||||
|
||||
for (unsigned i = 0; i < source->get_num_constants(); ++i) {
|
||||
for (unsigned i = 0, n = source->get_num_constants(); i < n; ++i) {
|
||||
func_decl * const c = source->get_constant(i);
|
||||
app * const term = info->find_term(c);
|
||||
expr * value = source->get_const_interp(c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue