X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.cpp;h=6e897fdb9d562febacc58fb7241e5006ac1475ac;hb=5a4c7d3fc7a6a6bc075ab88b1f49e330894e70ce;hp=2bedf2918acc2afa51d3734e56d5d04075eccd6c;hpb=a651f1eee4c28cc13376c020de8bd42cba628b55;p=novacoin.git diff --git a/src/main.cpp b/src/main.cpp index 2bedf29..6e897fd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3432,6 +3432,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) CInv inv(MSG_TX, tx.GetHash()); pfrom->AddInventoryKnown(inv); + // Truncate messages to the size of the tx in them + unsigned int nSize = ::GetSerializeSize(tx,SER_NETWORK, PROTOCOL_VERSION); + if (nSize < vMsg.size()){ + vMsg.resize(nSize); + } + bool fMissingInputs = false; if (tx.AcceptToMemoryPool(txdb, true, &fMissingInputs)) {