mirror of
https://github.com/github/codeql.git
synced 2026-04-23 15:55:18 +02:00
Update cpp/ql/src/Security/CWE/CWE-416/IteratorToExpiredContainer.qhelp
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
708d12624f
commit
22e843abc6
@@ -31,7 +31,7 @@ This is because the temporary container is not bound to a rvalue reference.
|
||||
<sample src="IteratorToExpiredContainerExtendedLifetime.cpp" />
|
||||
|
||||
<p>
|
||||
To fix <code>lifetime_of_temp_not_extended</code> consider rewriting the code so that the temporary's lifetime is extended.
|
||||
To fix <code>lifetime_of_temp_not_extended</code>, consider rewriting the code so that the lifetime of the temporary object is extended.
|
||||
In <code>fixed_lifetime_of_temp_not_extended</code> the lifetime of the temporary object has been extended by storing it in an rvalue reference.
|
||||
</p>
|
||||
<sample src="IteratorToExpiredContainerExtendedLifetime-fixed.cpp" />
|
||||
|
||||
Reference in New Issue
Block a user