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-13 08:22:28 +00:00 committed by Tim Edwards
parent ad1d9923f9
commit ca9229b35a
1 changed files with 1 additions and 0 deletions

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)