commit dunst for openSUSE:Factory
Hello community, here is the log from the commit of package dunst for openSUSE:Factory checked in at 2017-01-25 23:31:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dunst (Old) and /work/SRC/openSUSE:Factory/.dunst.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "dunst" Changes: -------- --- /work/SRC/openSUSE:Factory/dunst/dunst.changes 2015-07-02 22:47:04.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dunst.new/dunst.changes 2017-01-25 23:31:53.289419008 +0100 @@ -1,0 +2,6 @@ +Sat Jan 21 22:27:30 UTC 2017 - mimi.vx@gmail.com + +- removed unneded deps +- fixed bad free and memory leak by dunst_bad_free.patch + +------------------------------------------------------------------- New: ---- dunst_bad_free.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dunst.spec ++++++ --- /var/tmp/diff_new_pack.WQmuyt/_old 2017-01-25 23:31:53.769346680 +0100 +++ /var/tmp/diff_new_pack.WQmuyt/_new 2017-01-25 23:31:53.773346077 +0100 @@ -1,7 +1,7 @@ # # spec file for package dunst # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 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 @@ -24,39 +24,19 @@ Group: System/GUI/Other Url: http://www.knopwob.org/dunst/ Source: %{name}-%{version}.tar.bz2 -BuildRequires: xorg-x11-libs +Patch0: dunst_bad_free.patch +BuildRequires: pkgconfig BuildRequires: pkgconfig(cairo) -BuildRequires: pkgconfig(cairo-egl) -BuildRequires: pkgconfig(cairo-fc) -BuildRequires: pkgconfig(cairo-ft) -BuildRequires: pkgconfig(cairo-gl) -BuildRequires: pkgconfig(cairo-glx) -BuildRequires: pkgconfig(cairo-gobject) -BuildRequires: pkgconfig(cairo-pdf) -BuildRequires: pkgconfig(cairo-png) -BuildRequires: pkgconfig(cairo-ps) -BuildRequires: pkgconfig(cairo-script) -BuildRequires: pkgconfig(cairo-svg) -BuildRequires: pkgconfig(cairo-tee) -BuildRequires: pkgconfig(cairo-xcb) -BuildRequires: pkgconfig(cairo-xcb-shm) -BuildRequires: pkgconfig(cairo-xlib) -BuildRequires: pkgconfig(cairo-xlib-xrender) BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(gio-2.0) -BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(gmodule-2.0) -BuildRequires: pkgconfig(gmodule-export-2.0) -BuildRequires: pkgconfig(gmodule-no-export-2.0) -BuildRequires: pkgconfig(gobject-2.0) -BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(libnotify) BuildRequires: pkgconfig(libxdg-basedir) BuildRequires: pkgconfig(pango) BuildRequires: pkgconfig(pangocairo) -BuildRequires: pkgconfig(pangoft2) -BuildRequires: pkgconfig(pangoxft) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xft) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xscrnsaver) @@ -67,9 +47,10 @@ %prep %setup -q +%patch0 -p1 %build -make %{?_smp_mflags} +CFLAGS="%{optflags}" make %{?_smp_mflags} %install make PREFIX=%{buildroot}/%{_prefix} install @@ -82,6 +63,6 @@ %{_bindir}/dunst %{_datadir}/dbus-1/services/org.knopwob.dunst.service %{_datadir}/dunst -%{_mandir}/man1/dunst.1.gz +%{_mandir}/man1/dunst.1%{ext_man} %changelog ++++++ dunst_bad_free.patch ++++++
From 1e477395d9c93e3ec9dd0c113eec33874442515d Mon Sep 17 00:00:00 2001 From: John Chen <johnchen902@gmail.com> Date: Sat, 21 Jan 2017 14:38:36 +0800 Subject: [PATCH] Fix #281 bad free. Also fix a memory leak. (#282)
* Fix #281 bad free. Also fix a memory leak. With `n->icon = r->new_icon` and later `free(n->icon)` `r->new_icon` is wrongly freed. Fix that with strdup. Also fix an obvious memory leak by the way. --- src/rules.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) Index: dunst-1.1.0/rules.c =================================================================== --- dunst-1.1.0.orig/rules.c +++ dunst-1.1.0/rules.c @@ -15,8 +15,11 @@ void rule_apply(rule_t * r, notification n->timeout = r->timeout; if (r->urgency != -1) n->urgency = r->urgency; - if (r->new_icon) - n->icon = r->new_icon; + if (r->new_icon) { + if(n->icon) + g_free(n->icon); + n->icon = g_strdup(r->new_icon); + } if (r->fg) n->color_strings[ColFG] = r->fg; if (r->bg)
participants (1)
-
root@hilbertn.suse.de