Modified some of the verilog read-in code to avoid a segmentation
fault that would happen if the verilog had illegal syntax of a misspelled net name (although normally netgen is expected not to have to check the verilog for syntax, and there are probably many such cases of netgen failing to handle incorrect verilog and then crashing as a result).
This commit is contained in:
parent
615c55cbe2
commit
c27d933adc
|
|
@ -1898,12 +1898,21 @@ skip_endmodule:
|
|||
|
||||
if (i != -1)
|
||||
snprintf(nodename, MAX_STR_LEN, "%s[%d]", noderoot, i);
|
||||
else
|
||||
else if (lhs != NULL)
|
||||
strncpy(nodename, lhs->name, MAX_STR_LEN - 1);
|
||||
else {
|
||||
Printf("Error: Improper node name \"%s\".\n", noderoot);
|
||||
goto skip_endmodule;
|
||||
}
|
||||
if (j != -1)
|
||||
snprintf(assignname, MAX_STR_LEN, "%s[%d]", assignroot, j);
|
||||
else
|
||||
else if (rhs != NULL)
|
||||
strncpy(assignname, rhs->name, MAX_STR_LEN - 1);
|
||||
else {
|
||||
Printf("Error: Improper assignment name \"%s\".\n",
|
||||
assignroot);
|
||||
goto skip_endmodule;
|
||||
}
|
||||
|
||||
join(nodename, assignname);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue