qcacld-3.0: Fix errors which are causing format string vulnerability
Few errors are reported which causes format string vulnerability.
Fix those errors by providing appropriate string format.
Change-Id: Idbb0b5734d30fd28c191cfdee991cce0b6d77dac
CRs-Fixed: 1041911
diff --git a/core/hdd/src/wlan_hdd_conc_ut.c b/core/hdd/src/wlan_hdd_conc_ut.c
index 2d44f65..b792ddf 100644
--- a/core/hdd/src/wlan_hdd_conc_ut.c
+++ b/core/hdd/src/wlan_hdd_conc_ut.c
@@ -189,7 +189,7 @@
title, pcl_type_to_string(pcl_type));
if (chnl_1st_conn == 0)
snprintf(report[report_idx].first_persona,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
device_mode_to_string(first_persona));
else
snprintf(report[report_idx].first_persona,
@@ -198,7 +198,7 @@
device_mode_to_string(first_persona), chnl_1st_conn);
if (chnl_2nd_conn == 0)
snprintf(report[report_idx].second_persona,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
device_mode_to_string(second_persona));
else
snprintf(report[report_idx].second_persona,
@@ -207,7 +207,7 @@
device_mode_to_string(second_persona), chnl_2nd_conn);
if (chnl_3rd_conn == 0)
snprintf(report[report_idx].third_persona,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
device_mode_to_string(third_persona));
else
snprintf(report[report_idx].third_persona,
@@ -217,13 +217,13 @@
report[report_idx].status = status;
snprintf(report[report_idx].dbs_value,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
wma_is_hw_dbs_capable() ? "enable" : "disable");
snprintf(report[report_idx].system_conf,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
system_config_to_string(hdd_ctx->config->conc_system_pref));
snprintf(report[report_idx].result_code,
- MAX_ALLOWED_CHAR_IN_REPORT,
+ MAX_ALLOWED_CHAR_IN_REPORT, "%s",
status ? "PASS" : "FAIL");
snprintf(report[report_idx].reason,
MAX_ALLOWED_CHAR_IN_REPORT,