aboutsummaryrefslogtreecommitdiff
path: root/src/rpcrawtransaction.cpp
diff options
context:
space:
mode:
authorPavel Janík <Pavel@Janik.cz>2014-12-11 16:06:23 +0100
committerPavel Janík <Pavel@Janik.cz>2014-12-11 16:06:23 +0100
commitaa768f1848b00e0fd615016598d3fb1f1da240ed (patch)
treeb2ecdb153ad37413f31abad3e1118198d73bea03 /src/rpcrawtransaction.cpp
parent41cced21063a89992ef393dda4fffc44ff60c7c3 (diff)
signrawtransaction: validate private key.
Diffstat (limited to 'src/rpcrawtransaction.cpp')
-rw-r--r--src/rpcrawtransaction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index 8de15ff9e2..4a1af2207a 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -587,6 +587,8 @@ Value signrawtransaction(const Array& params, bool fHelp)
if (!fGood)
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
CKey key = vchSecret.GetKey();
+ if (!key.IsValid())
+ throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Private key outside allowed range");
tempKeystore.AddKey(key);
}
}