warning: '__builtin_strncpy' output may be truncated copying 255 bytes from
a string of length 255 [-Wstringop-truncation]
Change-Id: I7610e42fed5dab09a1476bbfdb31ae83d25b4560
Signed-off-by: mk5004.lee <mk5004.lee@samsung.com>
/* When a caller is an application, the unique name is appID. */
if (is_app)
*is_app = true;
- strncpy(unique_name, caller_appid, size - 1);
+ snprintf(unique_name, size, "%s", caller_appid);
} else {
/* Otherwise, the unique name is /proc/pid/cmdline. */
char *cmdline;
if (!cmdline)
return false;
else
- strncpy(unique_name, cmdline, size - 1);
+ snprintf(unique_name, size, "%s", cmdline);
free(cmdline);
}