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 7c1720a commit 856d512Copy full SHA for 856d512
cpp/ql/src/experimental/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql
@@ -182,9 +182,7 @@ class BadAllocCatchBlock extends CatchBlock {
182
*/
183
predicate noThrowInTryBlock(NewOrNewArrayExpr newExpr, BadAllocCatchBlock catchBlock) {
184
exists(TryStmt try |
185
- forall(Expr cand | cand.getEnclosingBlock().getEnclosingBlock*() = try.getStmt() |
186
- not convertedExprMayThrow(cand)
187
- ) and
+ not stmtMayThrow(try.getStmt()) and
188
try.getACatchClause() = catchBlock and
189
newExpr.getEnclosingBlock().getEnclosingBlock*() = try.getStmt()
190
)
0 commit comments