mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 09:53:00 +02:00
CodeQL LateNegativeTest.ql defRead.c routerLayer>=0
Code nearby tests 'routeLayer' for negativeness, but it is set and then used as array index without such a test. ASSERT added.
This commit is contained in:
committed by
Tim Edwards
parent
8ebad7d1a9
commit
d18b40d401
@@ -499,6 +499,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
|
||||
*/
|
||||
routeLayer = stype;
|
||||
|
||||
ASSERT(routerLayer >= 0, "routerLayer<0"); /* positive bounds check */
|
||||
lefl = defLayerMap[routeLayer].lefInfo;
|
||||
|
||||
/* Get correct rule for nondefault rules */
|
||||
|
||||
Reference in New Issue
Block a user