3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-06 15:25:46 +00:00

don't crash in Z3_model_eval API if not given a valid expression

Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
Nuno Lopes 2015-06-26 18:33:13 +01:00
parent e81dc5a0a0
commit 3104d2954c
3 changed files with 3 additions and 4 deletions

View file

@ -153,6 +153,7 @@ extern "C" {
if (v) *v = 0;
RESET_ERROR_CODE();
CHECK_NON_NULL(m, Z3_FALSE);
CHECK_IS_EXPR(t, Z3_FALSE);
model * _m = to_model_ref(m);
expr_ref result(mk_c(c)->m());
_m->eval(to_expr(t), result, model_completion == Z3_TRUE);