Update cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql

Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
This commit is contained in:
Jeroen Ketema
2022-12-13 10:57:34 +01:00
committed by GitHub
parent 18dea55071
commit b10ed976cc

View File

@@ -221,7 +221,7 @@ class LoopWithAlloca extends Stmt {
private int getAControllingVarInitialValue(Variable var, DataFlow::Node source) {
source = this.getAPrecedingDef(var) and
(
result = getExpr(source).(Expr).getValue().toInt()
result = getExpr(source).getValue().toInt()
or
result = getExpr(source).(Assignment).getRValue().getValue().toInt()
)