3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-25 20:46:01 +00:00

Fix nullptr dereference in pp_symbol with null symbol names

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-08-16 02:41:48 +00:00
parent b653b6d34e
commit ed874351be

View file

@ -42,10 +42,15 @@ static unsigned pp_symbol(std::ostream & out, symbol const & s) {
return static_cast<unsigned>(str.length());
}
else {
if (s.is_null()) {
out << "null";
return 4; // length of "null"
} else {
out << s.bare_str();
return static_cast<unsigned>(strlen(s.bare_str()));
}
}
}
#define TAB_SZ 2