From 5900ed3706caa1beeef88738e7b62194280af5d9 Mon Sep 17 00:00:00 2001 From: tevador Date: Sun, 5 Feb 2023 21:53:32 +0100 Subject: Add a size limit for tx_extra in tx pool --- src/cryptonote_core/cryptonote_tx_utils.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/cryptonote_core/cryptonote_tx_utils.cpp') 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 ) { -- cgit v1.2.3