Skip to content

Commit 8afd928

Browse files
Apply suggestions from code review
Co-authored-by: Felicity Chapman <[email protected]>
1 parent 2b36ba3 commit 8afd928

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/Security/CWE/CWE-416/UseOfStringAfterLifetimeEnds.qhelp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<overview>
77
<p>Calling <code>c_str</code> on a <code>std::string</code> object returns a pointer to the underlying character array.
8-
However, if the <code>std::string</code> object is destroyed, then the pointer returned by <code>c_str</code> is no
8+
When the <code>std::string</code> object is destroyed, the pointer returned by <code>c_str</code> is no
99
longer valid. If the pointer is used after the <code>std::string</code> object is destroyed, then the behavior is undefined.
1010
</p>
1111
</overview>
@@ -18,7 +18,7 @@ Ensure that the pointer returned by <code>c_str</code> does not outlive the unde
1818

1919
<example>
2020
<p>
21-
The following example concatenates two <code>std::string</code> objects, and then convert the resulting string to a
21+
The following example concatenates two <code>std::string</code> objects, and then converts the resulting string to a
2222
C string using <code>c_str</code> so that it can be passed to the <code>work</code> function.
2323

2424
However, the underlying <code>std::string</code> object that represents the concatenated string is destroyed as soon as the call

0 commit comments

Comments
 (0)