From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/
Date: Mon, 25 Dec 2023 19:51:43 +0000 (UTC) [thread overview]
Message-ID: <1703533860.00ade3e9be009dbb28f04b6cb1fac0f86cb24746.asturm@gentoo> (raw)
commit: 00ade3e9be009dbb28f04b6cb1fac0f86cb24746
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 25 19:23:45 2023 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Dec 25 19:51:00 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=00ade3e9
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 <AT> gentoo.org>
.../kio-5.113.0-fix-crash-malformed-exec.patch | 41 ++++++++++++++++++++++
kde-frameworks/kio/kio-5.113.0-r1.ebuild | 5 ++-
2 files changed, 45 insertions(+), 1 deletion(-)
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=(
next reply other threads:[~2023-12-25 19:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-25 19:51 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-25 19:51 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/kio/files/, kde-frameworks/kio/ Andreas Sturmlechner
2023-09-19 10:40 Andreas Sturmlechner
2023-04-22 16:21 Andreas Sturmlechner
2023-02-18 23:05 Andreas Sturmlechner
2023-01-30 21:43 Andreas Sturmlechner
2022-06-29 19:53 Andreas Sturmlechner
2022-02-10 9:13 Andreas Sturmlechner
2021-11-05 16:24 Andreas Sturmlechner
2021-09-14 9:04 Andreas Sturmlechner
2021-08-15 18:57 Andreas Sturmlechner
2021-07-11 20:47 Andreas Sturmlechner
2021-04-04 13:23 Andreas Sturmlechner
2021-02-03 22:33 Andreas Sturmlechner
2020-10-15 18:48 Andreas Sturmlechner
2020-09-29 12:49 Andreas Sturmlechner
2020-05-16 9:08 Andreas Sturmlechner
2020-05-15 8:16 Andreas Sturmlechner
2020-02-09 22:28 Andreas Sturmlechner
2019-12-22 22:48 Andreas Sturmlechner
2019-12-19 9:45 Andreas Sturmlechner
2019-01-12 14:35 Andreas Sturmlechner
2018-11-27 7:49 Andreas Sturmlechner
2017-11-29 16:40 Andreas Sturmlechner
2017-11-26 18:57 Andreas Sturmlechner
2017-05-29 22:58 Andreas Sturmlechner
2016-09-29 11:39 Michael Palimaka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1703533860.00ade3e9be009dbb28f04b6cb1fac0f86cb24746.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox