From 22b4f4e63242431264e66e6c9c8d8dcc2ab5dcbf Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 13 Nov 2024 11:14:29 +0100 Subject: [PATCH] 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) --- src/frontend/subckt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index b93424801..218502222 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -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));