fix(PISystemInfo): correct guard for df output parsing

The guard ml.size_s() < 2 allowed size==2, but ml[2] was then
accessed — OOB read on truncated or unusual df output lines.
This commit is contained in:
2026-08-06 17:01:30 +03:00
committed by andrey
parent 9e280ef976
commit 1a153eefbc
+1 -1
View File
@@ -177,7 +177,7 @@ PIVector<PISystemInfo::MountInfo> PISystemInfo::mountInfo(bool ignore_cache) {
l_df.pop_front();
for (const auto & s: l_df) {
PIStringList ml(s.replacedAll(" ", " ").split(" "));
if (ml.size_s() < 2) continue;
if (ml.size_s() < 3) continue;
if (ml.front() == "none") continue;
m.space_all = ml[1].toULLong();
m.space_used = ml[2].toULLong();