diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2023-12-25 20:23:45 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2023-12-25 20:51:00 +0100 |
commit | 00ade3e9be009dbb28f04b6cb1fac0f86cb24746 (patch) | |
tree | f656f1fd47a730d3c52045053a92448180a5d680 /kde-frameworks/kio | |
parent | kde-frameworks/kio: Fix dolphin crash while copying (diff) | |
download | gentoo-00ade3e9be009dbb28f04b6cb1fac0f86cb24746.tar.gz gentoo-00ade3e9be009dbb28f04b6cb1fac0f86cb24746.tar.bz2 gentoo-00ade3e9be009dbb28f04b6cb1fac0f86cb24746.zip |
kde-frameworks/kio: Fix Properties dialog crash over malformed Exec
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=465290
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kio')
-rw-r--r-- | kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch | 41 | ||||
-rw-r--r-- | kde-frameworks/kio/kio-5.113.0-r1.ebuild | 5 |
2 files changed, 45 insertions, 1 deletions
diff --git a/kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch b/kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch new file mode 100644 index 000000000000..3688fa4af276 --- /dev/null +++ b/kde-frameworks/kio/files/kio-5.113.0-fix-crash-malformed-exec.patch @@ -0,0 +1,41 @@ +From ebad60218b9d9e6901ae48c3dec9b90da963809c Mon Sep 17 00:00:00 2001 +From: Harald Sitter <sitter@kde.org> +Date: Wed, 13 Dec 2023 07:44:01 +0100 +Subject: [PATCH] kpropertiesdialog: don't trip over malformed Exec + +when the user incorrectly put env vars into the Program field the +resulting desktop file will be somewhat malformed and literally contain + +> Exec='FOO=1 Bar' + +this then needs careful handling when parsing so we don't accidentally +drain the execline list. when this scenario appears we'll need to assume +the last item in the list is the program as we can't really tell if it +is a program that looks like an env var or an env var without program + +BUG: 465290 +(cherry picked from commit 78d4364677fbe658c6e05d19bb158f895403ccc9) +--- + src/widgets/kpropertiesdialog.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/widgets/kpropertiesdialog.cpp b/src/widgets/kpropertiesdialog.cpp +index 93ec0759cf..25061825af 100644 +--- a/src/widgets/kpropertiesdialog.cpp ++++ b/src/widgets/kpropertiesdialog.cpp +@@ -3379,6 +3379,12 @@ KDesktopPropsPlugin::KDesktopPropsPlugin(KPropertiesDialog *_props) + execLine.pop_front(); + } + for (auto env : execLine) { ++ if (execLine.length() <= 1) { ++ // Don't empty out the list. If the last element contains an equal sign we have to treat it as part of the ++ // program name lest we have no program ++ // https://bugs.kde.org/show_bug.cgi?id=465290 ++ break; ++ } + if (!env.contains(QLatin1String("="))) { + break; + } +-- +GitLab + diff --git a/kde-frameworks/kio/kio-5.113.0-r1.ebuild b/kde-frameworks/kio/kio-5.113.0-r1.ebuild index 1d6824b359b1..b2f3e4451367 100644 --- a/kde-frameworks/kio/kio-5.113.0-r1.ebuild +++ b/kde-frameworks/kio/kio-5.113.0-r1.ebuild @@ -70,7 +70,10 @@ DEPEND="${RDEPEND} " PDEPEND=">=kde-frameworks/kded-${PVCUT}:5" -PATCHES=( "${FILESDIR}/${P}-fix-crash-while-copying.patch" ) # KDE-bug 448532 +PATCHES=( + "${FILESDIR}/${P}-fix-crash-while-copying.patch" # KDE-bug 448532 + "${FILESDIR}/${P}-fix-crash-malformed-exec.patch" # KDE-bug 465290 +) src_configure() { local mycmakeargs=( |