diff options
author | Brad King <brad.king@kitware.com> | 2017-10-10 12:43:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-10-10 12:43:41 (GMT) |
commit | f1a4ecdc0c62b46c90df5e8d20e6f61d06063894 (patch) | |
tree | 405aa77560c8a6855cdda3e6e63b5fa0b4e04af7 /Source/kwsys/SystemInformation.cxx | |
parent | c798dc8573a205f90663e9983b793b21fea28521 (diff) | |
parent | c551ff588b48cc4c286922779651890da0f3c22c (diff) | |
download | CMake-f1a4ecdc0c62b46c90df5e8d20e6f61d06063894.zip CMake-f1a4ecdc0c62b46c90df5e8d20e6f61d06063894.tar.gz CMake-f1a4ecdc0c62b46c90df5e8d20e6f61d06063894.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2017-10-10 (239bc737)
Diffstat (limited to 'Source/kwsys/SystemInformation.cxx')
-rw-r--r-- | Source/kwsys/SystemInformation.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx index 86fdccd..366fe30 100644 --- a/Source/kwsys/SystemInformation.cxx +++ b/Source/kwsys/SystemInformation.cxx @@ -1346,7 +1346,7 @@ std::string SymbolProperties::GetBinary() const std::string binary; char buf[1024] = { '\0' }; ssize_t ll = 0; - if ((ll = readlink("/proc/self/exe", buf, 1024)) > 0) { + if ((ll = readlink("/proc/self/exe", buf, 1024)) > 0 && ll < 1024) { buf[ll] = '\0'; binary = buf; } else { |