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 lateminer
parent e33598e170
commit cd9e9c7521

View File

@@ -99,6 +99,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;