From cd9e9c752155b6ee618e5f240abf9c667e34b5e8 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 6 Jun 2015 11:45:35 -0700 Subject: [PATCH] Fail in DecodeHexTx if there is extra data at the end --- src/core_read.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core_read.cpp b/src/core_read.cpp index 444a4c7eb..bf86055f8 100644 --- a/src/core_read.cpp +++ b/src/core_read.cpp @@ -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;