diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-12 11:51:23 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-12-12 11:52:07 +0100 |
commit | 5f7279ac70b755d3aac9582d36e08bdf0e3f4fc6 (patch) | |
tree | b95792e7392c57ad27a0bba9c093868bdfcd29b9 /src | |
parent | 1bcb52143a49e1edd01e0b840fc2f332e1b5e430 (diff) | |
parent | aa768f1848b00e0fd615016598d3fb1f1da240ed (diff) |
Merge pull request #5461
aa768f1 signrawtransaction: validate private key. (Pavel JanÃk)
Diffstat (limited to 'src')
-rw-r--r-- | src/rpcrawtransaction.cpp | 2 |
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); } } |