Skip to content

Commit e81b409

Browse files
committed
C++: Improve the description tag.
1 parent 9e39b08 commit e81b409

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @name Detect And Handle Memory Allocation Errors
3-
* @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.
4-
* --the programmer can get confused when check the error that occurs when allocating memory incorrectly.
3+
* @description `operator new` throws an exception on allocation failures, while `operator new(std::nothrow)` returns a null pointer.
4+
* Mixing up these two failure conditions can result in unexpected behavior.
55
* @kind problem
66
* @id cpp/detect-and-handle-memory-allocation-errors
77
* @problem.severity warning

0 commit comments

Comments
 (0)