mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
KWSys 2024-10-25 (7cff32e1)
Code extracted from:
https://gitlab.kitware.com/utils/kwsys.git
at commit 7cff32e10e2bfe763415bc550816e8a9608e5954 (master).
Upstream Shortlog
-----------------
Brad King (1):
6e847d08 SystemInformation: Add missing EOF check when reading /proc/cpuinfo
This commit is contained in:
committed by
Brad King
parent
ede7f2afa6
commit
acade348a7
@@ -3405,8 +3405,9 @@ bool SystemInformationImplementation::RetrieveInformationFromCpuInfoFile()
|
||||
}
|
||||
|
||||
size_t fileSize = 0;
|
||||
while (!feof(fd)) {
|
||||
buffer += static_cast<char>(fgetc(fd));
|
||||
int fc;
|
||||
while ((fc = fgetc(fd)) != EOF) {
|
||||
buffer += static_cast<char>(fc);
|
||||
fileSize++;
|
||||
}
|
||||
fclose(fd);
|
||||
|
||||
Reference in New Issue
Block a user