aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index ccf5353eb7..ef1d764146 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -482,6 +482,10 @@ bool CWallet::Verify()
fs::path wallet_path = fs::absolute(walletFile, GetDataDir());
+ if (fs::exists(wallet_path) && (!fs::is_regular_file(wallet_path) || fs::is_symlink(wallet_path))) {
+ return InitError(_("Invalid -wallet file"));
+ }
+
if (!wallet_paths.insert(wallet_path).second) {
return InitError(_("Duplicate -wallet filename"));
}