wallet: wallet args take argv[] as const
What changed, and why it matters
This commit changes the wallet's command-line argument handling so the program's input arguments are treated as read-only (const). It is a code-quality and type-safety improvement, not a security fix. There is no indication it prevents or fixes any exploit.
No security action needed. Treat as a normal refactoring/code-quality change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch modifies wallet_args::main in src/wallet/wallet_args.cpp and src/wallet/wallet_args.h to accept argv as const char* const argv[] instead of char** argv. This enforces const-correctness and prevents accidental mutation of argv strings, but it does not change runtime behavior, parsing logic, or access controls. No security vulnerability is addressed.
Changed components
src/wallet/wallet_args.cppsrc/wallet/wallet_args.hInspect captured patch +6 / −4
diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp
index 45e9afa..d73968b 100644
--- a/src/wallet/wallet_args.cpp
+++ b/src/wallet/wallet_args.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2024, The Monero Project
+// Copyright (c) 2014-2026, The Monero Project
//
// All rights reserved.
//
@@ -87,7 +87,8 @@ namespace wallet_args
}
std::pair<boost::optional<boost::program_options::variables_map>, bool> main(
- int argc, char** argv,
+ int argc,
+ const char* const argv[],
const char* const usage,
const char* const notice,
boost::program_options::options_description desc_params,
diff --git a/src/wallet/wallet_args.h b/src/wallet/wallet_args.h
index b68679c..348b592 100644
--- a/src/wallet/wallet_args.h
+++ b/src/wallet/wallet_args.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2024, The Monero Project
+// Copyright (c) 2014-2026, The Monero Project
//
// All rights reserved.
//
@@ -50,7 +50,8 @@ namespace wallet_args
pair.second: Should the execution terminate successfully without actually launching the application
*/
std::pair<boost::optional<boost::program_options::variables_map>, bool> main(
- int argc, char** argv,
+ int argc,
+ const char* const argv[],
const char* const usage,
const char* const notice,
boost::program_options::options_description desc_params,
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.