Found a counting issue with netcmp output that will overrun the

output string buffer if the size of the copied string is just
the wrong amount, due to the use of strcpy() instead of
strncpy() in at least one place.  Just hacked a solution by
allocating more space for the string, but this should be fixed
properly.  Also:  Discovered that the "zero valued resistor"
routine looks for shorted ports in the wrong place, and if it
finds shorted ports it wrongly decides that the device it's
looking at is a zero-valued resistor whether or not it really
is zero-valued.
This commit is contained in:
R. Timothy Edwards 2026-01-15 16:39:18 -05:00
parent 9b4185fe62
commit 777f7ef095
3 changed files with 7 additions and 6 deletions

View File

@ -1 +1 @@
1.5.314
1.5.315

View File

@ -2018,7 +2018,10 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
break;
}
}
if (found) break;
}
if (found) {
/* Beware remove shorting devices that */
/* connect two ports. Otherwise the */
/* port lists get screwed up. It is */
@ -2049,14 +2052,12 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
"matching may be affected.\n",
ob2->name);
// found = FALSE;
found = TRUE;
break;
}
}
}
if (found) break;
}
if (found) {
Fprintf(stdout, "Removing zero-valued device "
"%s from cell %s (%d) makes a better "

View File

@ -1622,8 +1622,8 @@ void FormatIllegalElementClasses()
char *permcount;
int bytesleft;
permname = CALLOC(right_col_end + 2, sizeof(char));
permcount = CALLOC(right_col_end + 2, sizeof(char));
permname = CALLOC(right_col_end + 100, sizeof(char));
permcount = CALLOC(right_col_end + 100, sizeof(char));
ostr = output_string_init();
found = 0;