From 69a7953ffccf35787f252c4f99d8f836d96e1a4e Mon Sep 17 00:00:00 2001 From: dyamy-lee Date: Tue, 19 Mar 2024 19:36:01 +0900 Subject: [PATCH] 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 --- common/vc_info_parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; -- 2.7.4