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
SLOG(LOG_DEBUG, vc_info_tag(), "[DEBUG] %s is real file, not symbolic link", path);
*is_symbolic = false;
} else {
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;
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;