mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
AK: Disallow creating NonnullRawPtr
s from r-value references
This would always result in a use-after-free.
This commit is contained in:
parent
1ddc4050f7
commit
b7e22f0916
Notes:
github-actions[bot]
2024-12-04 16:47:22 +00:00
Author: https://github.com/yyny
Commit: b7e22f0916
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2454
Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 1 additions and 0 deletions
|
@ -21,6 +21,7 @@ public:
|
|||
using ValueType = T;
|
||||
|
||||
NonnullRawPtr() = delete;
|
||||
NonnullRawPtr(T const&&) = delete;
|
||||
|
||||
NonnullRawPtr(T& other)
|
||||
: m_ptr(&other)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue