svn commit: r521943 - in head/security/kleopatra: . files
Adriaan de Groot
adridg at FreeBSD.org
Fri Jan 3 14:52:02 UTC 2020
Author: adridg
Date: Fri Jan 3 14:52:01 2020
New Revision: 521943
URL: https://svnweb.freebsd.org/changeset/ports/521943
Log:
Fix crashes in security/kleopatra
Peculiar dynamic_cast<> behavior returns nullptr. Do the cast
in two steps instead, which doesn't return nullptr.
PR: 242670
Reported by: Gerard Seibert
Added:
head/security/kleopatra/files/
head/security/kleopatra/files/patch-D26393 (contents, props changed)
Modified:
head/security/kleopatra/Makefile
Modified: head/security/kleopatra/Makefile
==============================================================================
--- head/security/kleopatra/Makefile Fri Jan 3 14:33:18 2020 (r521942)
+++ head/security/kleopatra/Makefile Fri Jan 3 14:52:01 2020 (r521943)
@@ -2,6 +2,7 @@
PORTNAME= kleopatra
DISTVERSION= ${KDE_APPLICATIONS_VERSION}
+PORTREVISION= 1
CATEGORIES= security kde kde-applications
MAINTAINER= kde at FreeBSD.org
Added: head/security/kleopatra/files/patch-D26393
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/kleopatra/files/patch-D26393 Fri Jan 3 14:52:01 2020 (r521943)
@@ -0,0 +1,47 @@
+Submitted upstream as D26393, see also
+ https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242670
+ https://bugs.kde.org/show_bug.cgi?id=415168
+
+diff --git src/commands/command_p.h src/commands/command_p.h
+index d9acbaae..0a16161e 100644
+--- src/commands/command_p.h
++++ src/commands/command_p.h
+@@ -37,6 +37,7 @@
+ #include "view/keylistcontroller.h"
+
+ #include <Libkleo/KeyListModel>
++#include <Libkleo/KeyRearrangeColumnsProxyModel>
+
+ #include <KMessageBox>
+
+@@ -73,7 +74,7 @@ public:
+ }
+ KeyListModelInterface *model() const
+ {
+- return view_ ? dynamic_cast<KeyListModelInterface *>(view_->model()) : nullptr;
++ return view_ ? dynamic_cast<KeyListModelInterface *>(dynamic_cast<KeyRearrangeColumnsProxyModel*>(view_->model())) : nullptr;
+ }
+ KeyListController *controller() const
+ {
+diff --git src/dialogs/lookupcertificatesdialog.cpp src/dialogs/lookupcertificatesdialog.cpp
+index 4f7b0246..313c4f9f 100644
+--- src/dialogs/lookupcertificatesdialog.cpp
++++ src/dialogs/lookupcertificatesdialog.cpp
+@@ -37,6 +37,8 @@
+ #include "ui_lookupcertificatesdialog.h"
+
+ #include <Libkleo/KeyListModel>
++#include <Libkleo/KeyRearrangeColumnsProxyModel>
++
+ #include <KConfigGroup>
+ #include <gpgme++/key.h>
+
+@@ -99,7 +101,7 @@ private:
+ if (!view) {
+ return std::vector<Key>();
+ }
+- const auto *const model = dynamic_cast<KeyListModelInterface*>(view->model());
++ const auto *const model = dynamic_cast<KeyListModelInterface*>(dynamic_cast<KeyRearrangeColumnsProxyModel*>(view->model()));
+ Q_ASSERT(model);
+ const QItemSelectionModel *const sm = view->selectionModel();
+ Q_ASSERT(sm);
More information about the svn-ports-all
mailing list