We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d22e2ba commit eb2790aCopy full SHA for eb2790a
cpp/ql/src/experimental/Security/CWE/CWE-416/IteratorToExpiredContainer.ql
@@ -65,10 +65,11 @@ DataFlow::Node getADestroyedNode() {
65
isPostUpdateOfQualifier(destructorCall, result)
66
)
67
or
68
+ // Case 2: Anything that was derived from the temporary that is now destroyed
69
+ // is also destroyed.
70
exists(CallInstruction call |
71
result.asInstruction() = call and
- DataFlow::localFlow(destroyedTemp.getNode(),
- DataFlow::operandNode(call.getThisArgumentOperand()))
72
+ DataFlow::localFlow(DataFlow::operandNode(call.getThisArgumentOperand()), n)
73
|
74
call.getStaticCallTarget() instanceof StdSequenceContainerAt or
75
call.getStaticCallTarget() instanceof StdMapAt
0 commit comments