Browse Source

Fail in DecodeHexTx if there is extra data at the end

pull/1/head
Matt Corallo 7 years ago
parent
commit
7ea0ad539f
  1. 2
      src/core_read.cpp

2
src/core_read.cpp

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

Loading…
Cancel
Save