aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/storages/http_abstract_invoke.h
diff options
context:
space:
mode:
authorAlexander Blair <snipa@jagtech.io>2021-01-07 17:55:13 -0800
committerAlexander Blair <snipa@jagtech.io>2021-01-07 17:55:13 -0800
commit7f1a83b852a3bcacea3cc01693ea7722344e338c (patch)
treeffae5c3819cf065808f62456b5d2442efe07bdd2 /contrib/epee/include/storages/http_abstract_invoke.h
parentMerge pull request #7282 (diff)
parentstorages: overridable limits for loading portable_storage from binary (diff)
downloadmonero-7f1a83b852a3bcacea3cc01693ea7722344e338c.tar.xz
Merge pull request #7287
89fe0e1c8 storages: overridable limits for loading portable_storage from binary (moneromooo-monero)
Diffstat (limited to 'contrib/epee/include/storages/http_abstract_invoke.h')
-rw-r--r--contrib/epee/include/storages/http_abstract_invoke.h7
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 a8bc945a8..08ac4c2ca 100644
--- a/contrib/epee/include/storages/http_abstract_invoke.h
+++ b/contrib/epee/include/storages/http_abstract_invoke.h
@@ -97,7 +97,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>