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 3ae4cb2 commit f64743eCopy full SHA for f64743e
cpp/ql/src/Security/CWE/CWE-570/IncorrectAllocationErrorHandling.cpp
@@ -34,7 +34,7 @@ void good1(std::size_t length) noexcept {
34
35
// GOOD: the allocation failure is handled appropriately.
36
void good2(std::size_t length) noexcept {
37
- int* dest = new int[length];
+ int* dest = new(std::nothrow) int[length];
38
if(!dest) {
39
return;
40
}
0 commit comments