From 725c8e9235d95d69eaf32505a6f6c86642987411 Mon Sep 17 00:00:00 2001 From: "R. Timothy Edwards" Date: Mon, 9 Mar 2026 14:40:53 -0400 Subject: [PATCH] Made a few corrections to yesterday's code. Most are minor, but one can potentially cause a crash condition. --- VERSION | 2 +- database/DBcellcopy.c | 2 +- drc/DRCbasic.c | 13 +++---------- drc/DRCtech.c | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/VERSION b/VERSION index 98a9e086..37e1482b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.616 +8.3.617 diff --git a/database/DBcellcopy.c b/database/DBcellcopy.c index 6c905650..e0d647e8 100644 --- a/database/DBcellcopy.c +++ b/database/DBcellcopy.c @@ -442,7 +442,7 @@ dbCopyMaskHintsFunc(key, proprec, puds) { /* Append the original values to the end of the list */ for (i = 0; i < parentproprec->prop_len; i++) - newproprec->prop_value.prop_integer[i + proprec->prop_len] = + newproprec->prop_value.prop_integer[i + j] = parentproprec->prop_value.prop_integer[i]; } diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index 521f4170..7d59ae6b 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -731,7 +731,7 @@ drcTile (tile, dinfo, arg) if (cptr->drcc_exception != (char)DRC_EXCEPTION_NONE) { PropertyRecord *proprec; - bool propfound, isinside; + bool propfound, isinside = FALSE; char *name; char idx = cptr->drcc_exception; if (idx < 0) idx = -idx - 1; @@ -740,12 +740,6 @@ drcTile (tile, dinfo, arg) /* Is there any exception area defined? */ proprec = DBPropGet(arg->dCD_celldef, name, &propfound); - /* Quickest case: Rule is an exception but there are no - * exception areas. - */ - if ((!propfound) && (cptr->drcc_exception >= 0)) - continue; - /* If an exception area exists, is the error edge inside? */ if (propfound) { @@ -776,8 +770,8 @@ drcTile (tile, dinfo, arg) * an exception area. Exception rules are ignored if * the edge is outside an exception area. */ - if (isinside && (cptr->drcc_exception < 0)) continue; if (!isinside && (cptr->drcc_exception >= 0)) continue; + if (isinside && (cptr->drcc_exception < 0)) continue; } /* DRC_ANGLES_90 and DRC_SPLITTILE rules are handled by */ @@ -1193,7 +1187,7 @@ drcTile (tile, dinfo, arg) if (cptr->drcc_exception != (char)DRC_EXCEPTION_NONE) { PropertyRecord *proprec; - bool propfound, isinside; + bool propfound, isinside = FALSE; char *name; char idx = cptr->drcc_exception; if (idx < 0) idx = -idx - 1; @@ -1217,7 +1211,6 @@ drcTile (tile, dinfo, arg) redge.r_ybot = redge.r_ytop = edgeY; redge.r_xbot = edgeLeft; redge.r_xtop = edgeRight; - isinside = FALSE; for (i = 0; i < proprec->prop_len; i += 4) { if ((i + 4) > proprec->prop_len) break; diff --git a/drc/DRCtech.c b/drc/DRCtech.c index d396a999..4b172eb8 100644 --- a/drc/DRCtech.c +++ b/drc/DRCtech.c @@ -1753,7 +1753,7 @@ drcMaxwidth(argc, argv) if (PlaneMaskHasPlane(pmask2, plane2)) break; - if (plane2 == plane) + if (PlaneMaskHasPlane(pmask, plane2)) TechError("Warning: Exclude types for \"maxwidth\" are on the " "same plane and so cannot be checked.\n"); }