From ee608aaeca8c4ecf00a83549cab42bc62a1a3184 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 9 Dec 2019 18:53:17 +0100 Subject: [PATCH] - Patch "bz1779029-segv" fixes a segmentation fault. https://github.com/chris2511/xca/commit/262c805 https://bugzilla.redhat.com/show_bug.cgi?id=1779029 --- xca-2.1.2-bz1779029-segv.patch | 19 +++++++++++++++++++ xca.spec | 14 ++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 xca-2.1.2-bz1779029-segv.patch diff --git a/xca-2.1.2-bz1779029-segv.patch b/xca-2.1.2-bz1779029-segv.patch new file mode 100644 index 0000000..97a4279 --- /dev/null +++ b/xca-2.1.2-bz1779029-segv.patch @@ -0,0 +1,19 @@ +diff -Naurp xca-2.1.2.orig/widgets/MainWindow.cpp xca-2.1.2.new/widgets/MainWindow.cpp +--- xca-2.1.2.orig/widgets/MainWindow.cpp 2018-11-07 19:06:57.000000000 +0100 ++++ xca-2.1.2.new/widgets/MainWindow.cpp 2019-12-03 12:41:21.042343946 +0100 +@@ -813,12 +813,12 @@ pki_multi *MainWindow::probeAnything(QSt + } catch (errorEx &err) { + Error(err); + } +- if (!pki->count()) { ++ if (pki && !pki->count()) { + delete pki; + pki = NULL; +- if (ret) +- *ret = 1; + } ++ if (!pki && ret) ++ *ret = 1; + return pki; + } + diff --git a/xca.spec b/xca.spec index 2d8c627..dfdbc41 100644 --- a/xca.spec +++ b/xca.spec @@ -4,10 +4,11 @@ Summary: Graphical X.509 certificate management tool Name: xca Version: 2.1.2 -Release: 3%{?dist} +Release: 4%{?dist} License: BSD URL: https://hohnstaedt.de/xca/ Source0: https://github.com/%{gitowner0}/%{gitproject0}/releases/download/RELEASE.%{version}/%{name}-%{version}.tar.gz +Patch1: xca-2.1.2-bz1779029-segv.patch BuildRequires: gcc-c++ BuildRequires: qt5-devel openssl-devel BuildRequires: xdg-utils @@ -38,7 +39,7 @@ format, portable across operating systems. %prep #------------------------------------------------------------------------------- -%setup -q +%autosetup -p 1 #------------------------------------------------------------------------------- @@ -122,14 +123,19 @@ rm -rf "${RPM_BUILD_ROOT}%{_docdir}/xca" #------------------------------------------------------------------------------- %changelog +#------------------------------------------------------------------------------- + +* Mon Dec 9 2019 Patrick Monnerat 2.1.2-4 +- Patch "bz1779029-segv" fixes a segmentation fault. + https://github.com/chris2511/xca/commit/262c805 + https://bugzilla.redhat.com/show_bug.cgi?id=1779029 + * Sat Jul 27 2019 Fedora Release Engineering - 2.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sun Feb 03 2019 Fedora Release Engineering - 2.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild -#------------------------------------------------------------------------------- - * Fri Jan 4 2019 Patrick Monnerat 2.1.2-1 - New upstream release. - Require qt database backends for external database support.