From 1c9ae19ec481c41414f8bf26347a4d0378b1764b Mon Sep 17 00:00:00 2001 From: 0x914409F1 Date: Sun, 19 May 2019 01:09:31 +0000 Subject: [PATCH] epee: portable_storage_base: implement array_entry_t copyctor (#25) "Manually initialize the array_entry_t iterator to ensure it points to the correct m_array, thereby preventing a potential use-after-free situation." Credit to Guido Vranken: https://hackerone.com/reports/511317 --- contrib/epee/include/storages/portable_storage_base.h | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/epee/include/storages/portable_storage_base.h b/contrib/epee/include/storages/portable_storage_base.h index 3620dbcc..99c792e5 100644 --- a/contrib/epee/include/storages/portable_storage_base.h +++ b/contrib/epee/include/storages/portable_storage_base.h @@ -80,6 +80,7 @@ namespace epee struct array_entry_t { 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 {