Skip to content

Commit 5c45c77

Browse files
authored
[rocprofv3] Sanitize string of command in rocpd (#467)
Sanitize string of command in rocpd Co-authored-by: Huanran Wang <huanrwan@amd.com>
1 parent 4af73d0 commit 5c45c77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/lib/output/generateRocpd.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ write_rocpd(
811811
auto command = fmt::format(
812812
"{}",
813813
fmt::join(tool_metadata.command_line.begin(), tool_metadata.command_line.end(), " "));
814+
auto _command = sanitize_sql_string(command);
814815

815816
auto stmt = get_insert_statement("rocpd_info_process{{uuid}}",
816817
{
@@ -822,7 +823,7 @@ write_rocpd(
822823
insert_value("fini", tool_metadata.process_end_ns),
823824
insert_value("start", tool_metadata.process_start_ns),
824825
insert_value("end", tool_metadata.process_end_ns),
825-
insert_value("command", command),
826+
insert_value("command", _command),
826827
insert_value("environment", json_env),
827828
insert_value("extdata", json_cfg),
828829
});

0 commit comments

Comments
 (0)