Fail in DecodeHexTx if there is extra data at the end

This commit is contained in:
Matt Corallo 2015-06-06 11:45:35 -07:00 committed by instagibbs
parent 6848561bd4
commit 7abc17e9c2

View file

@ -113,6 +113,8 @@ bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx, bool fTryNoWitne
CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
try {
ssData >> tx;
if (!ssData.empty())
return false;
}
catch (const std::exception&) {
return false;