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 c12837c commit e0606d6Copy full SHA for e0606d6
cpp/ql/src/experimental/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.ql
@@ -181,8 +181,9 @@ class BadAllocCatchBlock extends CatchBlock {
181
}
182
183
/**
184
- * Holds if `newExpr` will not throw an exception, but is embedded in a `try` statement
185
- * with a catch block `catchBlock` that catches an `std::bad_alloc` exception.
+ * Holds if `newExpr` is embedded in a `try` statement with a catch block `catchBlock` that
+ * catches a `std::bad_alloc` exception, but nothing in the `try` block (including the `newExpr`)
186
+ * will throw that exception.
187
*/
188
predicate noThrowInTryBlock(NewOrNewArrayExpr newExpr, BadAllocCatchBlock catchBlock) {
189
exists(TryStmt try |
0 commit comments