Hello community, here is the log from the commit of package pinentry for openSUSE:Factory checked in at 2019-07-31 14:13:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/pinentry (Old) and /work/SRC/openSUSE:Factory/.pinentry.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pinentry" Wed Jul 31 14:13:59 2019 rev:59 rq:718568 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/pinentry/pinentry.changes 2018-02-28 19:54:53.440987619 +0100 +++ /work/SRC/openSUSE:Factory/.pinentry.new.4126/pinentry.changes 2019-07-31 14:14:01.542880310 +0200 @@ -1,0 +2,11 @@ +Thu Jul 25 12:48:45 UTC 2019 - Pedro Monreal Gonzalez <pmonrealgonza...@suse.com> + +- Fix a dangling pointer in qt/main.cpp [bsc#1141883] + * Added pinentry-qt-Fix-use-of-dangling-pointer.patch + +------------------------------------------------------------------- +Thu Jul 25 10:24:55 UTC 2019 - Pedro Monreal Gonzalez <pmonrealgonza...@suse.com> + +- Updated spec file with spec-cleaner + +------------------------------------------------------------------- New: ---- pinentry-qt-Fix-use-of-dangling-pointer.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ pinentry.spec ++++++ --- /var/tmp/diff_new_pack.MOF0ml/_old 2019-07-31 14:14:02.238879793 +0200 +++ /var/tmp/diff_new_pack.MOF0ml/_new 2019-07-31 14:14:02.242879789 +0200 @@ -1,7 +1,7 @@ # # spec file for package pinentry # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -22,9 +22,9 @@ Version: 1.1.0 Release: 0 Summary: Collection of Simple PIN or Passphrase Entry Dialogs -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Productivity/Other -Url: http://www.gnupg.org/aegypten/ +URL: https://www.gnupg.org/aegypten/ Source: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2 Source1: ftp://ftp.gnupg.org/gcrypt/pinentry/%{name}-%{version}.tar.bz2.sig Source2: pinentry.keyring @@ -32,6 +32,8 @@ Patch1: pinentry-0.7.2-gtk+-2.4.diff # PATCH-FIX-SUSE make it build with ncurses ABI 6 Patch7: pinentry-ncurses6.diff +# PATCH-FIX-SUSE bsc#1141883 pinentry-qt crashes with QtCurve +Patch8: pinentry-qt-Fix-use-of-dangling-pointer.patch BuildRequires: fltk-devel >= 1.3 BuildRequires: libassuan-devel >= 2.1.0 BuildRequires: libgpg-error-devel >= 1.16 @@ -47,7 +49,6 @@ BuildRequires: pkgconfig(libsecret-1) Requires(post): %{install_info_prereq} Provides: pinentry-dialog -BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This is a collection of simple PIN or passphrase entry dialogs which @@ -121,6 +122,7 @@ %setup -q %patch1 -p1 %patch7 +%patch8 -p1 %build # Regenerate moc's @@ -167,9 +169,9 @@ %install cd tui -make %{?_smp_mflags} DESTDIR=%{buildroot} install +%make_install cd ../gui -make %{?_smp_mflags} DESTDIR=%{buildroot} install +%make_install # remove symlink rm -rf %{buildroot}%{_bindir}/pinentry @@ -185,7 +187,6 @@ %install_info_delete --info-dir=.%{_infodir} .%{_infodir}/pinentry.info.gz %files -%defattr(-,root,root) %license COPYING %doc AUTHORS ChangeLog NEWS README %{_infodir}/pinentry* @@ -194,25 +195,20 @@ %attr(755,root,root) %{_bindir}/pinentry-curses %files qt5 -%defattr(-,root,root) %attr(755,root,root) %{_bindir}/pinentry-qt5 %attr(755,root,root) %{_bindir}/pinentry-qt4 %attr(755,root,root) %{_bindir}/pinentry-qt %files gtk2 -%defattr(-,root,root) %attr(755,root,root) %{_bindir}/pinentry-gtk-2 %files gnome3 -%defattr(-,root,root) %attr(755,root,root) %{_bindir}/pinentry-gnome3 %files emacs -%defattr(-,root,root) %attr(755,root,root) %{_bindir}/pinentry-emacs %files fltk -%defattr(-,root,root) %attr(755,root,root) %{_bindir}/pinentry-fltk %changelog ++++++ pinentry-qt-Fix-use-of-dangling-pointer.patch ++++++ >From 0e2e53c8987d6f236aaef515eb005e8e86397fbc Mon Sep 17 00:00:00 2001 From: Andre Heinecke <aheine...@gnupg.org> Date: Thu, 25 Jul 2019 14:20:51 +0200 Subject: [PATCH 1/1] qt: Fix use of dangling pointer in QApplication * qt/main.cpp (main): Use a new variable for argc that stays valid. -- The QApplication constructor takes argc as a reference and the referenced integer has to stay alive for at least as long as the QApplication. GnuPG-Bug-Id: T4658 Based on a Patch from: Fabian Vogt <fv...@suse.com> Thanks! --- qt/main.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qt/main.cpp b/qt/main.cpp index fe88d26..4e61dff 100644 --- a/qt/main.cpp +++ b/qt/main.cpp @@ -330,6 +330,7 @@ main(int argc, char *argv[]) pinentry_init("pinentry-qt"); QApplication *app = NULL; + int new_argc = 0; #ifdef FALLBACK_CURSES if (!pinentry_have_display(argc, argv)) { @@ -369,8 +370,15 @@ main(int argc, char *argv[]) p += strlen(argv[i]) + 1; } - i = argc; - app = new QApplication(i, new_argv); + /* Note: QApplication uses int &argc so argc has to be valid + * for the full lifetime of the application. + * + * As Qt might modify argc / argv we use copies here so that + * we do not loose options that are handled in both. e.g. display. + */ + new_argc = argc; + Q_ASSERT (new_argc); + app = new QApplication(new_argc, new_argv); app->setWindowIcon(QIcon(QLatin1String(":/document-encrypt.png"))); } -- 2.11.0