From: dyamy-lee Date: Tue, 19 Mar 2024 10:36:01 +0000 (+0900) Subject: change temp_path's length X-Git-Tag: accepted/tizen/unified/20240325.141227~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69a7953ffccf35787f252c4f99d8f836d96e1a4e;p=platform%2Fcore%2Fuifw%2Fvoice-control.git change temp_path's length Change the temp_path's length as PATH_MAX*2. Previous version is reduced current_working_directory size as half of PATH_MAX, but ses build gives still fail. So, it changed increasing temp_path's length Change-Id: If957d04dd819267c4b9c0753809e3d2dde7d7e29 --- diff --git a/common/vc_info_parser.c b/common/vc_info_parser.c index d6ba008..3eb3081 100644 --- a/common/vc_info_parser.c +++ b/common/vc_info_parser.c @@ -375,11 +375,11 @@ 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/2]; - char temp_path[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); + char current_working_directory[PATH_MAX]; + char temp_path[PATH_MAX*2]; + if (getcwd(current_working_directory, PATH_MAX)) { + if (strlen(current_working_directory) + strlen(path) <= PATH_MAX*2) { + snprintf(temp_path, PATH_MAX*2, "%s/%s", current_working_directory, path); if (strncmp(temp_path, real_path, strlen(temp_path) + 1) == 0) { SLOG(LOG_DEBUG, vc_info_tag(), "[DEBUG] %s is real file, not symbolic link", path); *is_symbolic = false;