summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp b/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp
index 715493a..0ca2ff0 100644
--- a/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp
+++ b/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp
@@ -212,7 +212,7 @@ char* computeTMPDIR()
212 if (S_ISLNK(st.st_mode)) // Is it a symbolink link? 212 if (S_ISLNK(st.st_mode)) // Is it a symbolink link?
213 { 213 {
214 char env_dir2[PATH_MAX + 16]; 214 char env_dir2[PATH_MAX + 16];
215 ssize_t end = readlink(tmp, env_dir2, sizeof(char) * (PATH_MAX + 16)); // Use env_dir2 in case we need to add a '/' at the start 215 ssize_t end = readlink(tmp, env_dir2, sizeof(env_dir2) - 1); // Use env_dir2 in case we need to add a '/' at the start
216 if (end == -1) 216 if (end == -1)
217 { 217 {
218 fprintf(stderr, _("Error: Could not resolve symbolic link %s\n"), tmp); 218 fprintf(stderr, _("Error: Could not resolve symbolic link %s\n"), tmp);