mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Fix out-of-bounds read value for 2-state types (#7785)
Signed-off-by: Jakub Michalski <[email protected]>
This commit is contained in:
+5
-1
@@ -514,7 +514,11 @@ class UnknownVisitor final : public VNVisitor {
|
||||
} else if (nodeDtp->isString()) {
|
||||
xnum = V3Number{nodep, V3Number::String{}, ""};
|
||||
} else {
|
||||
xnum.setAllBitsX();
|
||||
if (nodeDtp->isFourstate()) {
|
||||
xnum.setAllBitsX();
|
||||
} else {
|
||||
xnum.setAllBits0();
|
||||
}
|
||||
}
|
||||
AstNode* const newp = new AstCond{nodep->fileline(), condp, nodep,
|
||||
new AstConst{nodep->fileline(), xnum}};
|
||||
|
||||
Reference in New Issue
Block a user