aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic/cryptonote_basic.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-04 00:15:57 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-04-05 09:35:19 +0000
commit089c7637a64652c8bcf6c437065237c23266d4a9 (patch)
tree1edb32e38080ab18184c0809ce0607c060682d05 /src/cryptonote_basic/cryptonote_basic.h
parentMerge pull request #5390 (diff)
downloadmonero-089c7637a64652c8bcf6c437065237c23266d4a9.tar.xz
cryptonote: rework block blob size sanity check
Use the actual block weight limit, assuming that weight is always greater or equal to size
Diffstat (limited to 'src/cryptonote_basic/cryptonote_basic.h')
-rw-r--r--src/cryptonote_basic/cryptonote_basic.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cryptonote_basic/cryptonote_basic.h b/src/cryptonote_basic/cryptonote_basic.h
index 03caafbb0..20d92bdf1 100644
--- a/src/cryptonote_basic/cryptonote_basic.h
+++ b/src/cryptonote_basic/cryptonote_basic.h
@@ -422,6 +422,8 @@ namespace cryptonote
FIELDS(*static_cast<block_header *>(this))
FIELD(miner_tx)
FIELD(tx_hashes)
+ if (tx_hashes.size() > CRYPTONOTE_MAX_TX_PER_BLOCK)
+ return false;
END_SERIALIZE()
};