Commit bf182581 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[KProcessList] Check size of data before accessing it

BUG: 431334
parent 115e0032
......@@ -87,6 +87,9 @@ bool getProcessInfo(const QString& procId, KProcessInfo& processInfo)
return false; // process may have exited
const QStringList data = QString::fromLocal8Bit(file.readAll()).split(QLatin1Char(' '));
if (data.length() < 2) {
return false;
}
qint64 pid = procId.toUInt();
QString name = data.at(1);
if (name.startsWith(QLatin1Char('(')) && name.endsWith(QLatin1Char(')'))) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment