aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2020-12-29 10:44:05 -0800
committerAlexander Blair <snipa@jagtech.io>2020-12-29 10:44:05 -0800
commit88b7bc394ebd7ad5a9fa06b70dac2658e75857d7 (patch)
tree10ef812054a19e9cf200bdcffaebc1b809a252cc /contrib/epee
parentMerge pull request #7207 (diff)
parentportable_storage: remove array element limit (diff)
downloadmonero-88b7bc394ebd7ad5a9fa06b70dac2658e75857d7.tar.xz
Merge pull request #7218
353f93ee1 portable_storage: remove array element limit (moneromooo-monero)
Diffstat (limited to 'contrib/epee')
-rw-r--r--contrib/epee/include/storages/portable_storage_from_bin.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/contrib/epee/include/storages/portable_storage_from_bin.h b/contrib/epee/include/storages/portable_storage_from_bin.h
index f92546823..eb0eed235 100644
--- a/contrib/epee/include/storages/portable_storage_from_bin.h
+++ b/contrib/epee/include/storages/portable_storage_from_bin.h
@@ -38,7 +38,6 @@
#define EPEE_PORTABLE_STORAGE_RECURSION_LIMIT_INTERNAL 100
#endif
#define EPEE_PORTABLE_STORAGE_OBJECT_LIMIT_INTERNAL 65536
-#define EPEE_PORTABLE_STORAGE_ARRAY_ELEMENT_LIMIT_INTERNAL 65536
namespace epee
{
@@ -105,7 +104,6 @@ namespace epee
size_t m_count;
size_t m_recursion_count;
size_t m_objects;
- size_t m_array_elements;
};
inline throwable_buffer_reader::throwable_buffer_reader(const void* ptr, size_t sz)
@@ -118,7 +116,6 @@ namespace epee
m_count = sz;
m_recursion_count = 0;
m_objects = 0;
- m_array_elements = 0;
}
inline
void throwable_buffer_reader::read(void* target, size_t count)
@@ -165,8 +162,6 @@ namespace epee
//for pod types
array_entry_t<type_name> sa;
size_t size = read_varint();
- CHECK_AND_ASSERT_THROW_MES(size < EPEE_PORTABLE_STORAGE_ARRAY_ELEMENT_LIMIT_INTERNAL - m_array_elements, "Too many array elements");
- m_array_elements += size;
CHECK_AND_ASSERT_THROW_MES(size <= m_count / ps_min_bytes<type_name>::strict, "Size sanity check failed");
sa.reserve(size);