Browse Source

Wallet/RPC: Use filename rather than CWallet pointer, for lockwallet RPCRunLater job name

The job name is logged, and could pose as an information leak to someone attacking the process, helping them counteract ASLR protections
0.15
Luke Dashjr 8 years ago
parent
commit
9756be382e
  1. 2
      src/wallet/rpcwallet.cpp

2
src/wallet/rpcwallet.cpp

@ -2077,7 +2077,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request) @@ -2077,7 +2077,7 @@ UniValue walletpassphrase(const JSONRPCRequest& request)
int64_t nSleepTime = request.params[1].get_int64();
pwallet->nRelockTime = GetTime() + nSleepTime;
RPCRunLater(strprintf("lockwallet_%u", uintptr_t(pwallet)), boost::bind(LockWallet, pwallet), nSleepTime);
RPCRunLater(strprintf("lockwallet(%s)", pwallet->strWalletFile), boost::bind(LockWallet, pwallet), nSleepTime);
return NullUniValue;
}

Loading…
Cancel
Save