mirror of
https://github.com/monero-project/monero.git
synced 2024-12-23 12:09:54 +00:00
Implement array_entry_t copy constructor
Manually initialize the array_entry_t iterator to ensure it points to the correct m_array, thereby preventing a potential use-after-free situation. Signed-off-by: Guido Vranken <guidovranken@gmail.com>
This commit is contained in:
parent
ea07a9bc61
commit
43042a28ec
1 changed files with 1 additions and 0 deletions
|
@ -82,6 +82,7 @@ namespace epee
|
||||||
struct array_entry_t
|
struct array_entry_t
|
||||||
{
|
{
|
||||||
array_entry_t():m_it(m_array.end()){}
|
array_entry_t():m_it(m_array.end()){}
|
||||||
|
array_entry_t(const array_entry_t& other):m_array(other.m_array), m_it(m_array.end()){}
|
||||||
|
|
||||||
const t_entry_type* get_first_val() const
|
const t_entry_type* get_first_val() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue