Skip to content

WIP: DesktopExecParser: fix crash due to out-of-bounds index into a QStringList

Ahmad Samir requested to merge work/ahmad/execparser into master

The code used execlist[0] without checking if the string list is empty first; it was instead checking if executableFullPath is empty, but now that env vars are parsed, executableFullPath can be not-empty, whereas KShell::splitArgs returns an empty string list.

BUG: 450809 FIXED-IN: 5.92


DesktopExecParser: tweak the env vars regex to exclude --option=bar

And extend the unit test with the example from[1].

[1] https://bugs.kde.org/show_bug.cgi?id=450809


Split KIO::DesktopExecParser unit tests out of krununittest

The plan is to move DesktopExecParser to a KF module in a higher tier (e.g. KService), so splitting the unit tests now is one step closer to that goal; and it's clear now that it's not tied to KRun, so no point putting its unit tests within krununittest.

GIT_SILENT

Merge request reports

Loading