From 76f12f1522d225c30725730d38d0e0a6c04ea7f7 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Mon, 28 Mar 2016 15:15:16 +0900 Subject: [PATCH] Fix Svace issue WGID 58558: PROC_USE.VULNERABLE Change-Id: Icf425b22f799a86370a41172962ac041f2278bac Signed-off-by: DoHyun Pyun --- hf-agent/bluetooth-hf-agent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hf-agent/bluetooth-hf-agent.c b/hf-agent/bluetooth-hf-agent.c index a63fca0..929a1b4 100755 --- a/hf-agent/bluetooth-hf-agent.c +++ b/hf-agent/bluetooth-hf-agent.c @@ -765,7 +765,7 @@ static gboolean __bt_hf_monitor_timer_cb(gpointer data) /* In the case of ATD, prev_cmd will be always ATD, because we will not * allow further commands. For safer side again set prev_cmd as ATD */ - strcpy(prev_cmd, "ATD"); + strncpy(prev_cmd, "ATD\0", BT_HF_CMD_BUF_SIZE - 1); } hf_handle_rx_at_cmd(&bt_hf_info, BT_HF_ERROR_RESP); -- 2.7.4