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:
parent
8ebad7d1a9
commit
d18b40d401
|
|
@ -499,6 +499,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
|
||||||
*/
|
*/
|
||||||
routeLayer = stype;
|
routeLayer = stype;
|
||||||
|
|
||||||
|
ASSERT(routerLayer >= 0, "routerLayer<0"); /* positive bounds check */
|
||||||
lefl = defLayerMap[routeLayer].lefInfo;
|
lefl = defLayerMap[routeLayer].lefInfo;
|
||||||
|
|
||||||
/* Get correct rule for nondefault rules */
|
/* Get correct rule for nondefault rules */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue