summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bignier <paul.bignier@scilab-enterprises.com>2016-12-12 10:03:57 +0100
committerPaul Bignier <paul.bignier@scilab-enterprises.com>2016-12-12 10:04:09 +0100
commit5a7d0cf913a2006871f39f492bb7b3a62c0f00d6 (patch)
tree48783230d7f1435114d8aa8253f3e54f6f259d5c
parent960ee79f60573d677d3820d43ec2074282bdc58f (diff)
downloadscilab-5a7d0cf913a2006871f39f492bb7b3a62c0f00d6.zip
scilab-5a7d0cf913a2006871f39f492bb7b3a62c0f00d6.tar.gz
AST::System_env: fix CID 1366885 & 1366884
Change-Id: I50a0dc4d33f40c1cfdef5b47c1bb2c36d8a4b1a7
-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);