Skip to content

Commit c7176e5

Browse files
committed
C++: Tweak wording in docs
1 parent 931b0f1 commit c7176e5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ overflows and wraps around.
4242

4343
<p>
4444
In both of these checks, the operations are performed in the wrong order.
45-
First, an expression that may lead to undefined behavior is evaluated
45+
First, an expression that may cause undefined behavior is evaluated
4646
(<code>ptr + a</code>), and then the result is checked for being in range.
4747
But once undefined behavior has happened in the pointer addition, it cannot
4848
be recovered from: it's too late to perform the range check after a possible
@@ -57,7 +57,7 @@ allocation.
5757
</p>
5858

5959
<p>
60-
The next example shows how to portably check whether a number is outside the
60+
The next example shows how to portably check whether an unsigned number is outside the
6161
range of an allocation between <code>ptr</code> and <code>ptr_end</code>.
6262
</p>
6363
<sample src="PointerOverflow-good.cpp" />

cpp/ql/src/Likely Bugs/Memory Management/PointerOverflow.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @name Pointer overflow check
3-
* @description Adding a value to a pointer to see if it overflows relies
3+
* @description Adding a value to a pointer to check if it overflows relies
44
* on undefined behavior and may lead to memory corruption.
55
* @kind problem
66
* @problem.severity error

0 commit comments

Comments
 (0)