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
parent d2aa2c8aff
commit 35ca77db2f

View file

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