Re-enable detection of over- or underflow of number of nodes

when calling a subcircuit.
Update to commit
c12296182 ("The code in src/frontend/subckt.c has a
fixed-size structure called table at the top with a
size set to N_GLOBAL_NODES = 1005.  If the number of
items passed in formal and actual exceeds 1005, then
ngspice exits immediately with an error.", 2023-03-14)
This commit is contained in:
Holger Vogt 2024-11-13 11:14:29 +01:00
parent 33ef1fc876
commit 22b4f4e632
1 changed files with 1 additions and 0 deletions

View File

@ -1621,6 +1621,7 @@ settrans(char *formal, int flen, char *actual, const char *subname)
{
int i;
flen++; // make flen large enough to detect over- or underflow
table = TMALLOC(struct tab, flen + 1);
memset(table, 0, (size_t)(flen + 1) * sizeof(struct tab));