Skip to content

Commit 7ea0ad5

Browse files
committed
Fail in DecodeHexTx if there is extra data at the end
1 parent 1c2edd9 commit 7ea0ad5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/core_read.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ bool DecodeHexTx(CMutableTransaction& tx, const std::string& strHexTx, bool fTry
111111
CDataStream ssData(txData, SER_NETWORK, PROTOCOL_VERSION);
112112
try {
113113
ssData >> tx;
114+
if (!ssData.empty())
115+
return false;
114116
}
115117
catch (const std::exception&) {
116118
return false;

0 commit comments

Comments
 (0)