Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47a419a commit 7b8a51fCopy full SHA for 7b8a51f
1 file changed
cpp/ql/test/experimental/query-tests/Security/CWE/CWE-570/semmle/tests/test.cpp
@@ -205,4 +205,10 @@ void bad_new_with_nonthrowing_call() {
205
Foo f;
206
if(f) { }
207
} catch(...) { }
208
-}
+}
209
+
210
+void bad_new_catch_baseclass_of_bad_alloc() {
211
+ try {
212
+ int* p = new(std::nothrow) int; // BAD [NOT DETECTED]
213
+ } catch(const std::exception&) { }
214
0 commit comments