diff options
author | Luke Mewburn <Luke@Mewburn.net> | 2022-08-20 11:17:07 +1000 |
---|---|---|
committer | Luke Mewburn <Luke@Mewburn.net> | 2022-08-20 11:17:07 +1000 |
commit | 1c9614d34d09d39486e579c6c21b0218997739c8 (patch) | |
tree | f35754d3c642710fe69a41090c4a702197c11323 /TAO/orbsvcs/ImplRepo_Service | |
parent | 280392c8b7831e1257f4c286a08a43685b9193ca (diff) | |
download | ATCD-1c9614d34d09d39486e579c6c21b0218997739c8.tar.gz |
Fix -Wformat-security issues
Ensure that methods with a printf()-like format string
are invoked with a literal string instead of a string
built from possibly untrusted sources.
Fixes issue #1906.
Diffstat (limited to 'TAO/orbsvcs/ImplRepo_Service')
-rw-r--r-- | TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp index ab2e06d5c0f..e605c547c89 100644 --- a/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp +++ b/TAO/orbsvcs/ImplRepo_Service/ImR_Activator_i.cpp @@ -537,7 +537,7 @@ ImR_Activator_i::start_server(const char* name, 1, cmdline_buf_len + 1, this->env_buf_len_, this->max_env_vars_); - proc_opts.command_line (ACE_TEXT_CHAR_TO_TCHAR(cmdline)); + proc_opts.command_line (ACE_TEXT("%s"), ACE_TEXT_CHAR_TO_TCHAR(cmdline)); proc_opts.working_directory (dir); // Win32 does not support the CLOSE_ON_EXEC semantics for sockets // the way unix does, so in order to avoid having the child process @@ -564,13 +564,13 @@ ImR_Activator_i::start_server(const char* name, { CORBA::String_var ior = orb_->object_to_string (locator_.in ()); proc_opts.setenv (ACE_TEXT ("ImplRepoServiceIOR"), - ACE_TEXT_CHAR_TO_TCHAR (ior.in ())); + ACE_TEXT ("%s"), ACE_TEXT_CHAR_TO_TCHAR (ior.in ())); } for (CORBA::ULong i = 0; i < env.length (); ++i) { proc_opts.setenv (ACE_TEXT_CHAR_TO_TCHAR (env[i].name.in ()), - ACE_TEXT_CHAR_TO_TCHAR (env[i].value.in ())); + ACE_TEXT ("%s"), ACE_TEXT_CHAR_TO_TCHAR (env[i].value.in ())); } pid = this->process_mgr_.spawn (proc_opts, this); |