Patchwork [12/12] lib: fwts_framework: use strncat instead of strcat

login
register
mail settings
Submitter Colin King
Date Nov. 4, 2012, 10:19 p.m.
Message ID <1352067590-11820-13-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/197110/
State Rejected
Headers show

Comments

Colin King - Nov. 4, 2012, 10:19 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_framework.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
index e515e05..c9c7ec8 100644
--- a/src/lib/src/fwts_framework.c
+++ b/src/lib/src/fwts_framework.c
@@ -787,8 +787,8 @@  static void fwts_framework_heading_info(fwts_framework *fw, fwts_list *tests_to_
 		fwts_list_foreach(item, tests_to_run) {
 			fwts_framework_test *test = fwts_list_data(fwts_framework_test *, item);
 			if (item != fwts_list_head(tests_to_run))
-				strcat(tests, " ");
-			strcat(tests, test->name);
+				strncat(tests, " ", len);
+			strncat(tests, test->name, len);
 		}
 
 		fwts_log_info(fw, "Running tests: %s.",