mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Fail in DecodeHexTx if there is extra data at the end
This commit is contained in:
parent
d2aa2c8aff
commit
35ca77db2f
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue