From bda624e26a92482ae420221ee976e524e77d03ed Mon Sep 17 00:00:00 2001 From: sowle Date: Fri, 21 Feb 2020 00:15:15 +0300 Subject: [PATCH] minor fix in get_bundle_root_dir() --- src/wallet/plain_wallet_api.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/plain_wallet_api.cpp b/src/wallet/plain_wallet_api.cpp index 6cbde104..e899caf1 100644 --- a/src/wallet/plain_wallet_api.cpp +++ b/src/wallet/plain_wallet_api.cpp @@ -40,9 +40,8 @@ namespace plain_wallet { std::string get_bundle_root_dir() { - char buffer[1000] = {0}; - strcpy(buffer, getenv("HOME")); - return buffer; + char* env = getenv("HOME"); + return env ? env : ""; } std::string get_wallets_folder()