Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2131f35

Browse files
authored
Update WrongInDetectingAndHandlingMemoryAllocationErrors.ql
1 parent 2b946ae commit 2131f35

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

cpp/ql/src/experimental/Security/CWE/CWE-570/WrongInDetectingAndHandlingMemoryAllocationErrors.ql

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @name Сonfusion In Detecting And Handling Memory Allocation Errors
2+
* @name onfusion In Detecting And Handling Memory Allocation Errors
33
* @description --::operator new(std::size_t) throws an exception on error, and ::operator new(std::size_t, const std::nothrow_t &) returns zero on error.
44
* --the programmer can get confused when check the error that occurs when allocating memory incorrectly.
55
* @kind problem
@@ -47,9 +47,7 @@ class WrongCheckErrorOperatorNew extends FunctionCall {
4747
* Holds if handler `try ... catch` exists.
4848
*/
4949
predicate isExistsTryCatchBlock() {
50-
exists(TryStmt ts |
51-
this.getEnclosingStmt() = ts.getStmt().getAChild*()
52-
)
50+
exists(TryStmt ts | this.getEnclosingStmt() = ts.getStmt().getAChild*())
5351
}
5452

5553
/**

0 commit comments

Comments
 (0)