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

Colin King colin.king at canonical.com
Sun Nov 4 22:19:50 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

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

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.",
-- 
1.7.10.4




More information about the fwts-devel mailing list