File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
cpp/ql/src/experimental/Security/CWE/CWE-675 Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ predicate closeWithoutChangeBefore(FunctionCall fc) {
158
158
/** Holds, if a sequential call of the specified functions is possible, via a higher-level function call. */
159
159
predicate callInOtherFunctions ( FunctionCall fc , FunctionCall fc1 ) {
160
160
exists ( FunctionCall fec1 , FunctionCall fec2 |
161
- // fec1.getTarget() != fec2.getTarget() and
162
161
fc .getEnclosingFunction ( ) != fc1 .getEnclosingFunction ( ) and
163
162
fec1 = fc .getEnclosingFunction ( ) .getACallToThisFunction ( ) and
164
163
fec2 = fc1 .getEnclosingFunction ( ) .getACallToThisFunction ( ) and
@@ -201,10 +200,12 @@ where
201
200
not exists ( CallMayNotReturn fctmp | fctmp = fc .getASuccessor * ( ) ) and
202
201
not exists ( IfStmt ifs | ifs .getCondition ( ) .getAChild * ( ) = fc ) and
203
202
(
203
+ // detecting a repeated call situation within one function
204
204
closeReturn ( fc ) and
205
205
closeWithoutChangeBefore ( fc1 ) and
206
206
callInOtherFunctions ( fc , fc1 )
207
207
or
208
+ // detection of repeated call in different functions
208
209
interDoubleCloseFunctions ( fc , fc1 )
209
210
) and
210
211
similarArguments ( fc , fc1 )
You can’t perform that action at this time.
0 commit comments