Hello community,

here is the log from the commit of package qalculate for openSUSE:Factory 
checked in at 2018-05-11 11:28:08
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qalculate (Old)
 and      /work/SRC/openSUSE:Factory/.qalculate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "qalculate"

Fri May 11 11:28:08 2018 rev:19 rq:605327 version:2.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/qalculate/qalculate.changes      2018-03-20 
21:34:53.716687423 +0100
+++ /work/SRC/openSUSE:Factory/.qalculate.new/qalculate.changes 2018-05-11 
11:28:10.072615202 +0200
@@ -1,0 +2,6 @@
+Tue May  8 12:26:36 UTC 2018 - fab...@ritter-vogt.de
+
+- Add patch to fix FD leak (boo#1092329):
+  * 0001-Fix-leaking-of-FDs-created-by-pipe.patch
+
+-------------------------------------------------------------------

New:
----
  0001-Fix-leaking-of-FDs-created-by-pipe.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ qalculate.spec ++++++
--- /var/tmp/diff_new_pack.AChK92/_old  2018-05-11 11:28:10.920584298 +0200
+++ /var/tmp/diff_new_pack.AChK92/_new  2018-05-11 11:28:10.920584298 +0200
@@ -26,6 +26,8 @@
 Group:          Productivity/Scientific/Math
 Url:            https://qalculate.github.io/
 Source:         
https://github.com/Qalculate/libqalculate/releases/download/v%{version}/%{libname}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM (https://github.com/Qalculate/libqalculate/pull/87)
+Patch1:         0001-Fix-leaking-of-FDs-created-by-pipe.patch
 BuildRequires:  gcc-c++
 BuildRequires:  gmp-devel
 BuildRequires:  intltool
@@ -72,6 +74,7 @@
 
 %prep
 %setup -q -n %{libname}-%{version}
+%autopatch -p1
 
 %build
 %configure --disable-static

++++++ 0001-Fix-leaking-of-FDs-created-by-pipe.patch ++++++
>From 34d7203c5b5c45d2140d01cd7131e51c3f9ef570 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fv...@suse.com>
Date: Tue, 8 May 2018 14:11:47 +0200
Subject: [PATCH] Fix leaking of FDs created by pipe

Use pipe2 to pass O_CLOEXEC.
---
 libqalculate/util.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libqalculate/util.cc b/libqalculate/util.cc
index a1d29b7..8ee8bcf 100644
--- a/libqalculate/util.cc
+++ b/libqalculate/util.cc
@@ -38,6 +38,7 @@
 #      include <initguid.h>
 #      include <shlobj.h>
 #else
+#      include <fcntl.h>
 #      include <utime.h>
 #      include <unistd.h>
 #      include <pwd.h>
@@ -834,7 +835,7 @@ bool Thread::cancel() {
 Thread::Thread() : running(false), m_pipe_r(NULL), m_pipe_w(NULL) {
        pthread_attr_init(&m_thread_attr);
        int pipe_wr[] = {0, 0};
-       if(pipe(pipe_wr) == 0) {
+       if(pipe2(pipe_wr, O_CLOEXEC) == 0) {
                m_pipe_r = fdopen(pipe_wr[0], "r");
                m_pipe_w = fdopen(pipe_wr[1], "w");
        }
-- 
2.16.2


Reply via email to