3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00

Check that Z3_get_numeral_small is given non-null out params

Analogous to other Z3_get_numeral_* functions with out params.
This commit is contained in:
Josh Berdine 2025-03-29 12:56:04 +00:00
parent 63ad2837e2
commit 9b5a9b2089

View file

@ -318,6 +318,10 @@ extern "C" {
LOG_Z3_get_numeral_small(c, a, num, den);
RESET_ERROR_CODE();
CHECK_IS_EXPR(a, false);
if (!num || !den) {
SET_ERROR_CODE(Z3_INVALID_ARG, nullptr);
return false;
}
rational r;
bool ok = Z3_get_numeral_rational(c, a, r);
if (ok) {