From 9831812839c2274c0585ee9eb3c7544e73bf5411 Mon Sep 17 00:00:00 2001 From: "andrey.bychkov" Date: Thu, 6 Aug 2026 10:19:28 +0300 Subject: [PATCH] fix(PISystemInfo): correct guard for df output parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The guard ml.size_s() < 2 allowed size==2, but ml[2] was then accessed — OOB read on truncated or unusual df output lines. --- libs/main/system/pisysteminfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/main/system/pisysteminfo.cpp b/libs/main/system/pisysteminfo.cpp index dbf5fafe..fd993bd1 100644 --- a/libs/main/system/pisysteminfo.cpp +++ b/libs/main/system/pisysteminfo.cpp @@ -177,7 +177,7 @@ PIVector 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();