From: dyamy-lee Date: Mon, 11 Mar 2024 07:13:45 +0000 (+0900) Subject: re-fix build error about snprintf X-Git-Tag: accepted/tizen/unified/20240315.111155~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c3e587feb13330de4ac28c6fda6c9017e9c4b46;p=platform%2Fcore%2Fuifw%2Fvoice-control.git re-fix build error about snprintf The variable's length is not proper. So, it changed to reduce size of the variable Change-Id: I82a2b505ae2f08418a8c552110bdf050e3f7cc8a --- diff --git a/common/vc_info_parser.c b/common/vc_info_parser.c index 25e28ce..e0479cb 100644 --- a/common/vc_info_parser.c +++ b/common/vc_info_parser.c @@ -375,9 +375,9 @@ static int __is_symbolic_link(const char* path, bool* is_symbolic) SLOG(LOG_DEBUG, vc_info_tag(), "[DEBUG] %s is real file, not symbolic link", path); *is_symbolic = false; } else { - char current_working_directory[PATH_MAX]; + char current_working_directory[PATH_MAX/2]; char temp_path[PATH_MAX]; - if (getcwd(current_working_directory, PATH_MAX)) { + if (getcwd(current_working_directory, PATH_MAX/2)) { if (strlen(current_working_directory) + strlen(path) <= PATH_MAX) { snprintf(temp_path, PATH_MAX, "%s/%s", current_working_directory, path); if (strncmp(temp_path, real_path, strlen(temp_path) + 1) == 0) {