Fail in DecodeHexTx if there is extra data at the end
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user