Move from strlen to strnlen_s.

Change-Id: I1d25a65e020b45b556723de14ef55a6140229dbb
diff --git a/test/hftest/inc/hftest_impl.h b/test/hftest/inc/hftest_impl.h
index d75b402..34c73e6 100644
--- a/test/hftest/inc/hftest_impl.h
+++ b/test/hftest/inc/hftest_impl.h
@@ -272,7 +272,7 @@
 #define HFTEST_SERVICE_SELECT(vm_id, service, send_buffer)                    \
 	do {                                                                  \
 		struct hf_vcpu_run_return run_res;                            \
-		uint32_t msg_length = strlen(service);                        \
+		uint32_t msg_length = strnlen_s(service, 64);                 \
                                                                               \
 		/*                                                            \
 		 * Let the service configure its mailbox and wait for a       \
diff --git a/test/hftest/linux_main.c b/test/hftest/linux_main.c
index 450dc1c..3cb58d1 100644
--- a/test/hftest/linux_main.c
+++ b/test/hftest/linux_main.c
@@ -52,8 +52,8 @@
 			return;
 		}
 
-		memiter_init(&suite_name, argv[2], strlen(argv[2]));
-		memiter_init(&test_name, argv[3], strlen(argv[3]));
+		memiter_init(&suite_name, argv[2], strnlen_s(argv[2], 64));
+		memiter_init(&test_name, argv[3], strnlen_s(argv[3], 64));
 		hftest_run(suite_name, test_name);
 		return;
 	}