mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
Update cpp/ql/src/Likely Bugs/Memory Management/AllocaInLoop.ql
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com>
This commit is contained in:
@@ -221,7 +221,7 @@ class LoopWithAlloca extends Stmt {
|
|||||||
private int getAControllingVarInitialValue(Variable var, DataFlow::Node source) {
|
private int getAControllingVarInitialValue(Variable var, DataFlow::Node source) {
|
||||||
source = this.getAPrecedingDef(var) and
|
source = this.getAPrecedingDef(var) and
|
||||||
(
|
(
|
||||||
result = getExpr(source).(Expr).getValue().toInt()
|
result = getExpr(source).getValue().toInt()
|
||||||
or
|
or
|
||||||
result = getExpr(source).(Assignment).getRValue().getValue().toInt()
|
result = getExpr(source).(Assignment).getRValue().getValue().toInt()
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user