CodeQL MissingNegativtyTest.ql ttype>=0 ResSimSubckt()

This variable is used as array index, but the extGetDevType() API allows
a negative return to occur.
This commit is contained in:
Darryl L. Miles
2025-02-22 21:31:22 -05:00
committed by Tim Edwards
parent ad1d9923f9
commit ca9229b35a
+1
View File
@@ -426,6 +426,7 @@ ResSimSubckt(line)
return 1;
}
ttype = extGetDevType(EFDevTypes[j]);
ASSERT(ttype >= 0, "ttype<0");
/* Find the device record that corresponds to the device name */
for (devptr = ExtCurStyle->exts_device[ttype]; devptr; devptr = devptr->exts_next)