diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2021-01-06 13:19:58 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2021-01-07 20:24:29 +0000 |
commit | 372754a66e6492590f9fdf2af519f03eb38d5e0f (patch) | |
tree | 667af79016b01a67fd25d1834c29b935fe9a9dd8 /contrib/epee/include/storages/http_abstract_invoke.h | |
parent | Merge pull request #7281 (diff) | |
download | monero-372754a66e6492590f9fdf2af519f03eb38d5e0f.tar.xz |
storages: overridable limits for loading portable_storage from binary
Diffstat (limited to 'contrib/epee/include/storages/http_abstract_invoke.h')
-rw-r--r-- | contrib/epee/include/storages/http_abstract_invoke.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/epee/include/storages/http_abstract_invoke.h b/contrib/epee/include/storages/http_abstract_invoke.h index c4cb91130..c615b20e6 100644 --- a/contrib/epee/include/storages/http_abstract_invoke.h +++ b/contrib/epee/include/storages/http_abstract_invoke.h @@ -98,7 +98,12 @@ namespace epee return false; } - return serialization::load_t_from_binary(result_struct, epee::strspan<uint8_t>(pri->m_body)); + static const constexpr epee::serialization::portable_storage::limits_t default_http_bin_limits = { + 65536 * 3, // objects + 65536 * 3, // fields + 65536 * 3, // strings + }; + return serialization::load_t_from_binary(result_struct, epee::strspan<uint8_t>(pri->m_body), &default_http_bin_limits); } template<class t_request, class t_response, class t_transport> |