Skip to content

Commit a0d2213

Browse files
authored
Merge pull request #18503 from MathiasVP/scanf-check-prepare-fix
C++: Harden `checkedForEof`
2 parents 90faab4 + 01cbd2f commit a0d2213

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cpp/ql/src/Critical/ScanfChecks.qll

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ private string getEofValue() {
3737
*/
3838
private predicate checkedForEof(ScanfFunctionCall call) {
3939
exists(IRGuardCondition gc |
40-
exists(Instruction i | i.getUnconvertedResultExpression() = call |
40+
exists(CallInstruction i | i.getUnconvertedResultExpression() = call |
4141
exists(int val | gc.comparesEq(valueNumber(i).getAUse(), val, _, _) |
4242
// call == EOF
4343
val = getEofValue().toInt()

0 commit comments

Comments
 (0)