summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-25 13:43:54 (GMT)
committerBrad King <brad.king@kitware.com>2023-05-25 13:43:54 (GMT)
commit4032968220a53bbf66e38455d51ecdcdf603921d (patch)
tree512d724b9cfbf860a1c0881aac78cae78e31d5d4
parent02db7f044d0d6097be865968318108b5229c5e4b (diff)
parent5df527f7afc7b366072693ad8c40ea418d9c50d1 (diff)
downloadCMake-4032968220a53bbf66e38455d51ecdcdf603921d.zip
CMake-4032968220a53bbf66e38455d51ecdcdf603921d.tar.gz
CMake-4032968220a53bbf66e38455d51ecdcdf603921d.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream * upstream-KWSys: KWSys 2023-05-25 (c9f0da47)
-rw-r--r--Source/kwsys/SystemInformation.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 20e2edb..7f8485e 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -3453,6 +3453,10 @@ bool SystemInformationImplementation::RetrieveInformationFromCpuInfoFile()
fileSize++;
}
fclose(fd);
+ if (fileSize < 2) {
+ std::cout << "No data in /proc/cpuinfo" << std::endl;
+ return false;
+ }
buffer.resize(fileSize - 2);
// Number of logical CPUs (combination of multiple processors, multi-core
// and SMT)