mirror of
https://github.com/Z3Prover/z3
synced 2026-03-16 18:20:00 +00:00
Fix null pointer dereferences and uninitialized variables from discussion #8891
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
9dcd01c52b
commit
391febed3b
5 changed files with 14 additions and 6 deletions
|
|
@ -3458,6 +3458,8 @@ namespace realclosure {
|
|||
if (sc) sc = sc->prev();
|
||||
i--;
|
||||
}
|
||||
if (!sc)
|
||||
return 0;
|
||||
return ext->sdt()->qs()[sc->qidx()].size();
|
||||
}
|
||||
|
||||
|
|
@ -3474,6 +3476,8 @@ namespace realclosure {
|
|||
if (sc) sc = sc->prev();
|
||||
i--;
|
||||
}
|
||||
if (!sc)
|
||||
return 0;
|
||||
const polynomial & q = ext->sdt()->qs()[sc->qidx()];
|
||||
return q.size();
|
||||
}
|
||||
|
|
@ -3491,6 +3495,8 @@ namespace realclosure {
|
|||
if (sc) sc = sc->prev();
|
||||
i--;
|
||||
}
|
||||
if (!sc)
|
||||
return numeral();
|
||||
const polynomial & q = ext->sdt()->qs()[sc->qidx()];
|
||||
if (j >= q.size())
|
||||
return numeral();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue