diff options
author | xiphon <xiphon@protonmail.com> | 2020-12-28 23:51:25 +0000 |
---|---|---|
committer | xiphon <xiphon@protonmail.com> | 2020-12-28 23:51:25 +0000 |
commit | 20bdbd7aab8dea57566b0d35cdf0e8790ddc2e29 (patch) | |
tree | 43cad4f4cb36238d9b521be35870a79d842925f0 /contrib/epee/include/storages/portable_storage.h | |
parent | Merge pull request #7130 (diff) | |
download | monero-20bdbd7aab8dea57566b0d35cdf0e8790ddc2e29.tar.xz |
portable_storage: forbid unnamed sections
Diffstat (limited to 'contrib/epee/include/storages/portable_storage.h')
-rw-r--r-- | contrib/epee/include/storages/portable_storage.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/epee/include/storages/portable_storage.h b/contrib/epee/include/storages/portable_storage.h index 589e6ad63..2aeadf72c 100644 --- a/contrib/epee/include/storages/portable_storage.h +++ b/contrib/epee/include/storages/portable_storage.h @@ -266,6 +266,7 @@ namespace epee static_assert(std::is_rvalue_reference<entry_type&&>(), "unexpected copy of value"); TRY_ENTRY(); CHECK_AND_ASSERT(psection, nullptr); + CHECK_AND_ASSERT(!pentry_name.empty(), nullptr); auto ins_res = psection->m_entries.emplace(pentry_name, std::forward<entry_type>(entry)); return &ins_res.first->second; CATCH_ENTRY("portable_storage::insert_new_entry_get_storage_entry", nullptr); |