Fix build warning based on GCC-9 32/221432/1
authorJusung Son <jusung07.son@samsung.com>
Thu, 2 Jan 2020 08:30:37 +0000 (17:30 +0900)
committerJusung Son <jusung07.son@samsung.com>
Thu, 2 Jan 2020 08:35:34 +0000 (17:35 +0900)
Change-Id: I31d1b69b475616abe5183e86c53ce50a8e9884b2
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
src/app_control.c

index e48147f6b3d71fca463bf6f45d8f6d2cd93e388c..d54a2c4fa4c2c539f9aa0ea7a07c04181bcc9fcc 100644 (file)
@@ -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,