aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_tx_utils.cpp
diff options
context:
space:
mode:
authortevador <tevador@gmail.com>2023-02-05 21:53:32 +0100
committerselsta <selsta@sent.at>2023-03-18 20:01:58 +0100
commit5900ed3706caa1beeef88738e7b62194280af5d9 (patch)
tree7aff8902624d7dbf8952267eee28823054e0f703 /src/cryptonote_core/cryptonote_tx_utils.cpp
parentMerge pull request #8739 (diff)
downloadmonero-5900ed3706caa1beeef88738e7b62194280af5d9.tar.xz
Add a size limit for tx_extra in tx pool
Diffstat (limited to 'src/cryptonote_core/cryptonote_tx_utils.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_tx_utils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_tx_utils.cpp b/src/cryptonote_core/cryptonote_tx_utils.cpp
index bf58a120d..5058b89a9 100644
--- a/src/cryptonote_core/cryptonote_tx_utils.cpp
+++ b/src/cryptonote_core/cryptonote_tx_utils.cpp
@@ -437,6 +437,8 @@ namespace cryptonote
if (!sort_tx_extra(tx.extra, tx.extra))
return false;
+ CHECK_AND_ASSERT_MES(tx.extra.size() <= MAX_TX_EXTRA_SIZE, false, "TX extra size (" << tx.extra.size() << ") is greater than max allowed (" << MAX_TX_EXTRA_SIZE << ")");
+
//check money
if(summary_outs_money > summary_inputs_money )
{