Corrected error that potentially causes a segfault in "lef write"

when accessing the inverse layer map array beyond its defined
allocated limit of DBNumUserLayers.
This commit is contained in:
Tim Edwards 2019-02-06 11:09:46 -05:00
parent af3ac0dde4
commit 1beb7cd741
1 changed files with 1 additions and 2 deletions

View File

@ -172,7 +172,6 @@ lefWriteHeader(def, f, lefTech)
fprintf(f, "VERSION 5.3 ;\n");
fprintf(f, " NAMESCASESENSITIVE ON ;\n");
fprintf(f, " NOWIREEXTENSIONATPIN ON ;\n");
fprintf(f, " NOWIREEXTENSIONATPIN ON ;\n");
fprintf(f, " DIVIDERCHAR \"/\" ;\n");
fprintf(f, " BUSBITCHARS \"[]\" ;\n");
@ -421,7 +420,7 @@ lefYankGeometry(tile, cdata)
TiToRect(tile, &area);
while (ttype < DBNumTypes)
while (ttype < DBNumUserLayers)
{
lefMagicToLefLayer = lefdata->lefMagicMap;
if (lefMagicToLefLayer[ttype].lefInfo != NULL)