Skip to content

Commit 6e7644f

Browse files
authored
Update FindIncorrectlyUsedExceptions.ql
1 parent d61fcfc commit 6e7644f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-703/FindIncorrectlyUsedExceptions.ql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ where
3434
)
3535
or
3636
fc.getTarget() instanceof Constructor and
37-
fc.getTargetType().(Class).getABaseClass+().hasGlobalOrStdName("exception") and
37+
(
38+
fc.getTargetType().(Class).getABaseClass+().hasGlobalOrStdName("exception") or
39+
fc.getTargetType().(Class).getABaseClass+().hasGlobalOrStdName("CException")
40+
) and
3841
not fc.isInMacroExpansion() and
3942
not exists(ThrowExpr texp | fc.getEnclosingStmt() = texp.getEnclosingStmt()) and
4043
not exists(FunctionCall fctmp | fctmp.getAnArgument() = fc) and

0 commit comments

Comments
 (0)