Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/files/, kde-frameworks/plasma/
Date: Tue, 31 Dec 2019 20:09:11
Message-Id: 1577822930.13ada4b568106cabbccd59a7fefe7b913b02bf90.asturm@gentoo
1 commit: 13ada4b568106cabbccd59a7fefe7b913b02bf90
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 31 20:08:14 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 31 20:08:50 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13ada4b5
7
8 kde-frameworks/plasma: Fix crash in calendar plugin
9
10 Package-Manager: Portage-2.3.84, Repoman-2.3.20
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 .../plasma-5.65.0-calendar-out-of-bounds.patch | 53 +++++++++++++++
14 kde-frameworks/plasma/plasma-5.65.0-r1.ebuild | 76 ++++++++++++++++++++++
15 2 files changed, 129 insertions(+)
16
17 diff --git a/kde-frameworks/plasma/files/plasma-5.65.0-calendar-out-of-bounds.patch b/kde-frameworks/plasma/files/plasma-5.65.0-calendar-out-of-bounds.patch
18 new file mode 100644
19 index 00000000000..4c96921abd5
20 --- /dev/null
21 +++ b/kde-frameworks/plasma/files/plasma-5.65.0-calendar-out-of-bounds.patch
22 @@ -0,0 +1,53 @@
23 +From 6756d00fba11ca2af921a67acdb5e3c92e23bb8a Mon Sep 17 00:00:00 2001
24 +From: David Edmundson <kde@×××××××××××××××××.uk>
25 +Date: Wed, 18 Dec 2019 12:52:15 +0000
26 +Subject: [calendar] Check out of bounds array access in QLocale lookup
27 +
28 +Summary:
29 +If we have a broken locale setup we don't have any uiLanugages to look
30 +up the relevant locale object for.
31 +
32 +In that case use the system locale.
33 +
34 +Test Plan:
35 +Had a crash here
36 +
37 +#11 0x00007ff982aab0b2 in QList<QString>::at(int) const (this=0x7ffd50b1d928, i=0) at /opt/qt5/include/QtCore/qlist.h:571
38 +#12 0x00007ff982aaaa4a in Calendar::monthName() const (this=0x5640cce026f0) at /home/david/projects/kde5/src/frameworks/plasma-framework/src/declarativeimports/calendar/calendar.cpp:202
39 +#13 0x00007ff982aa14e9 in Calendar::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x5640cce026f0, _c=QMetaObject::ReadProperty, _id=9, _a=0x7ffd50b1dd40) at src/declarativeimports/calendar/calendarplugin_autogen/EWIEGA46WW/moc_calendar.cpp:340
40 +
41 +Reviewers: #plasma, vkrause
42 +
43 +Reviewed By: vkrause
44 +
45 +Subscribers: kde-frameworks-devel
46 +
47 +Tags: #frameworks
48 +
49 +Differential Revision: https://phabricator.kde.org/D25960
50 +---
51 + src/declarativeimports/calendar/calendar.cpp | 9 ++++++---
52 + 1 file changed, 6 insertions(+), 3 deletions(-)
53 +
54 +diff --git a/src/declarativeimports/calendar/calendar.cpp b/src/declarativeimports/calendar/calendar.cpp
55 +index f652c65..c77824d 100644
56 +--- a/src/declarativeimports/calendar/calendar.cpp
57 ++++ b/src/declarativeimports/calendar/calendar.cpp
58 +@@ -199,9 +199,12 @@ QString Calendar::monthName() const
59 + // locale and take the month name from that.
60 + //
61 + // See https://bugs.kde.org/show_bug.cgi?id=353715
62 +- const QString lang = QLocale().uiLanguages().at(0);
63 +- // If lang is empty, it will create just a system locale
64 +- QLocale langLocale(lang);
65 ++
66 ++ QLocale langLocale;
67 ++
68 ++ if (QLocale().uiLanguages().length() > 0) {
69 ++ langLocale = QLocale(QLocale().uiLanguages().at(0));
70 ++ }
71 + return langLocale.standaloneMonthName(m_displayedDate.month());
72 + }
73 +
74 +--
75 +cgit v1.1
76
77 diff --git a/kde-frameworks/plasma/plasma-5.65.0-r1.ebuild b/kde-frameworks/plasma/plasma-5.65.0-r1.ebuild
78 new file mode 100644
79 index 00000000000..29c9ed58b90
80 --- /dev/null
81 +++ b/kde-frameworks/plasma/plasma-5.65.0-r1.ebuild
82 @@ -0,0 +1,76 @@
83 +# Copyright 1999-2019 Gentoo Authors
84 +# Distributed under the terms of the GNU General Public License v2
85 +
86 +EAPI=7
87 +
88 +KDE_ORG_NAME="${PN}-framework"
89 +PVCUT=$(ver_cut 1-2)
90 +QTMIN=5.12.3
91 +VIRTUALX_REQUIRED="test"
92 +inherit ecm kde.org
93 +
94 +DESCRIPTION="Plasma framework"
95 +LICENSE="LGPL-2+"
96 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
97 +IUSE="gles2 wayland X"
98 +
99 +# drop qtgui subslot operator when QT_MINIMAL >= 5.14.0
100 +BDEPEND="
101 + >=kde-frameworks/kdoctools-${PVCUT}:5
102 +"
103 +RDEPEND="
104 + >=kde-frameworks/kactivities-${PVCUT}:5
105 + >=kde-frameworks/karchive-${PVCUT}:5
106 + >=kde-frameworks/kconfig-${PVCUT}:5
107 + >=kde-frameworks/kconfigwidgets-${PVCUT}:5
108 + >=kde-frameworks/kcoreaddons-${PVCUT}:5
109 + >=kde-frameworks/kdeclarative-${PVCUT}:5
110 + >=kde-frameworks/kglobalaccel-${PVCUT}:5
111 + >=kde-frameworks/kguiaddons-${PVCUT}:5
112 + >=kde-frameworks/ki18n-${PVCUT}:5
113 + >=kde-frameworks/kiconthemes-${PVCUT}:5
114 + >=kde-frameworks/kio-${PVCUT}:5
115 + >=kde-frameworks/kirigami-${PVCUT}:5
116 + >=kde-frameworks/knotifications-${PVCUT}:5
117 + >=kde-frameworks/kpackage-${PVCUT}:5
118 + >=kde-frameworks/kservice-${PVCUT}:5
119 + >=kde-frameworks/kwidgetsaddons-${PVCUT}:5
120 + >=kde-frameworks/kwindowsystem-${PVCUT}:5
121 + >=kde-frameworks/kxmlgui-${PVCUT}:5
122 + >=dev-qt/qtdbus-${QTMIN}:5
123 + >=dev-qt/qtdeclarative-${QTMIN}:5
124 + >=dev-qt/qtgui-${QTMIN}:5=[gles2=]
125 + >=dev-qt/qtquickcontrols-${QTMIN}:5
126 + >=dev-qt/qtsql-${QTMIN}:5
127 + >=dev-qt/qtsvg-${QTMIN}:5
128 + >=dev-qt/qtwidgets-${QTMIN}:5
129 + !gles2? ( virtual/opengl )
130 + wayland? (
131 + >=kde-frameworks/kwayland-${PVCUT}:5
132 + media-libs/mesa[egl]
133 + )
134 + X? (
135 + >=dev-qt/qtx11extras-${QTMIN}:5
136 + x11-libs/libX11
137 + x11-libs/libxcb
138 + )
139 +"
140 +DEPEND="${RDEPEND}
141 + X? ( x11-base/xorg-proto )
142 +"
143 +
144 +RESTRICT+=" test"
145 +
146 +PATCHES=( "${FILESDIR}/${P}-calendar-out-of-bounds.patch" )
147 +
148 +src_configure() {
149 + local mycmakeargs=(
150 + $(cmake_use_find_package !gles2 OpenGL)
151 + $(cmake_use_find_package wayland EGL)
152 + $(cmake_use_find_package wayland KF5Wayland)
153 + $(cmake_use_find_package X X11)
154 + $(cmake_use_find_package X XCB)
155 + )
156 +
157 + ecm_src_configure
158 +}