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:
parent
9b4185fe62
commit
777f7ef095
|
|
@ -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 "
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue