[PATCH v16 7/9] argp: do not display option name translations if __libc_enable_secure
Vivien Kraus
vivien@planete-kraus.eu
Thu Oct 30 20:13:12 GMT 2025
---
argp/argp-help.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/argp/argp-help.c b/argp/argp-help.c
index 08650ea5b1..2feb2a1ac6 100644
--- a/argp/argp-help.c
+++ b/argp/argp-help.c
@@ -1217,6 +1217,9 @@ canonical_option_translation (const char *option_name,
size_t canonical_length;
static const char *default_context = "command-line option\004";
*allocated = NULL;
+ if (__libc_enable_secure)
+ /* Translations are disabled. */
+ return option_name;
option_msgid = malloc (strlen (default_context) + strlen (option_name) + 1);
all_names = NULL;
if (option_msgid)
--
2.34.1
More information about the Libc-alpha
mailing list