From af0af63742fd2383dae5627d0ce8167517fd4700 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 18 Apr 2021 12:00:25 +0300 Subject: [PATCH] Fix last change * src/emacs.c (load_pdump_find_executable): Fix the value of CANDIDATE_SIZE when the final candidate is a symlink. --- src/emacs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/emacs.c b/src/emacs.c index 896e129c75f..922da9f1da3 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -795,7 +795,10 @@ load_pdump_find_executable (char const *argv0, ptrdiff_t *candidate_size) char *real_name = realpath (candidate, NULL); if (real_name) - return real_name; + { + *candidate_size = strlen (real_name) + 1; + return real_name; + } } return candidate; } -- 2.39.5