diff --git a/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql b/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql index 02d0e5d96dd..4cff735b79c 100644 --- a/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql +++ b/cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql @@ -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() )