summaryrefslogtreecommitdiffstats
path: root/Source/kwsys
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys')
-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)