We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 276738a commit c87036fCopy full SHA for c87036f
cpp/ql/src/Likely Bugs/Memory Management/ReturnStackAllocatedMemory.ql
@@ -39,7 +39,7 @@ predicate varMaybeStackAllocated(LocalVariable lv) {
39
// that possibly points to the stack, or if it is a possibly stack allocated array
40
// that is converted (implicitly or explicitly) to a pointer
41
predicate exprMayPointToStack(Expr e) {
42
- e instanceof AddressOfExpr and exprMaybeStackAllocated(e.(AddressOfExpr).getAnOperand())
+ exprMaybeStackAllocated(e.(AddressOfExpr).getAnOperand())
43
or
44
varMayPointToStack(e.(VariableAccess).getTarget())
45
0 commit comments