From 50bb8b1ba0ceb7fccbbdf904b2a8ffdb6ffe763a Mon Sep 17 00:00:00 2001 From: Jusung Son Date: Thu, 2 Jan 2020 17:30:37 +0900 Subject: [PATCH] Fix build warning based on GCC-9 Change-Id: I31d1b69b475616abe5183e86c53ce50a8e9884b2 Signed-off-by: Jusung Son --- src/app_control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app_control.c b/src/app_control.c index e48147f..d54a2c4 100644 --- a/src/app_control.c +++ b/src/app_control.c @@ -1147,10 +1147,10 @@ int app_control_set_launch_mode(app_control_h app_control, switch (mode) { case APP_CONTROL_LAUNCH_MODE_SINGLE: - strncpy(launch_mode, LAUNCH_MODE_SINGLE, strlen(LAUNCH_MODE_SINGLE)); + strncpy(launch_mode, LAUNCH_MODE_SINGLE, sizeof(launch_mode) - 1); break; case APP_CONTROL_LAUNCH_MODE_GROUP: - strncpy(launch_mode, LAUNCH_MODE_GROUP, strlen(LAUNCH_MODE_GROUP)); + strncpy(launch_mode, LAUNCH_MODE_GROUP, sizeof(launch_mode) - 1); break; default: return app_control_error(APP_CONTROL_ERROR_INVALID_PARAMETER, -- 2.34.1