Fix 10794: Crash in MultiValueFlowAnalyzer::getProgramState() (#3815)
* Fix 10794: Crash in MultiValueFlowAnalyzer::getProgramState() * Format
This commit is contained in:
parent
09da69b1c7
commit
a50452517d
|
@ -6306,6 +6306,8 @@ struct MultiValueFlowAnalyzer : ValueFlowAnalyzer {
|
|||
ProgramState ps;
|
||||
for (const auto& p : values) {
|
||||
const Variable* var = vars.at(p.first);
|
||||
if (!var)
|
||||
continue;
|
||||
ps[var->nameToken()] = p.second;
|
||||
}
|
||||
return ps;
|
||||
|
|
|
@ -6273,6 +6273,16 @@ private:
|
|||
" }\n"
|
||||
"};\n";
|
||||
valueOfTok(code, "f.c");
|
||||
|
||||
code = "void d(fmpz_t a, fmpz_t b) {\n"
|
||||
" if (fmpz_sgn(0)) {}\n"
|
||||
" else if (b) {}\n"
|
||||
"}\n"
|
||||
"void e(psl2z_t f) {\n"
|
||||
" f->b;\n"
|
||||
" d(&f->a, c);\n"
|
||||
"}\n";
|
||||
valueOfTok(code, "f");
|
||||
}
|
||||
|
||||
void valueFlowHang() {
|
||||
|
|
Loading…
Reference in New Issue