guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: dunst: Fix crash on invalid pixbuf notificat


From: guix-commits
Subject: branch master updated: gnu: dunst: Fix crash on invalid pixbuf notification.
Date: Fri, 04 Feb 2022 16:31:45 -0500

This is an automated email from the git hooks/post-receive script.

dannym pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new ba60aede97 gnu: dunst: Fix crash on invalid pixbuf notification.
ba60aede97 is described below

commit ba60aede97330c5145f3245eb67a70b984b59116
Author: Danny Milosavljevic <dannym@scratchpost.org>
AuthorDate: Fri Feb 4 22:27:17 2022 +0100

    gnu: dunst: Fix crash on invalid pixbuf notification.
    
    * gnu/packages/patches/dunst-1.7.3-fix-crash.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/dunst.scm (dunst)[source]<#:patches>: Add it.
---
 gnu/local.mk                                     |  1 +
 gnu/packages/dunst.scm                           |  4 +++-
 gnu/packages/patches/dunst-1.7.3-fix-crash.patch | 21 +++++++++++++++++++++
 3 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index f3487637ad..146b2a116a 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1005,6 +1005,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \
   %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch     \
   %D%/packages/patches/dstat-skip-devices-without-io.patch     \
+  %D%/packages/patches/dunst-1.7.3-fix-crash.patch             \
   %D%/packages/patches/dvd+rw-tools-add-include.patch          \
   %D%/packages/patches/dynaconf-unvendor-deps.patch            \
   %D%/packages/patches/ecl-16-format-directive-limit.patch     \
diff --git a/gnu/packages/dunst.scm b/gnu/packages/dunst.scm
index 998470e411..7446c3689a 100644
--- a/gnu/packages/dunst.scm
+++ b/gnu/packages/dunst.scm
@@ -27,6 +27,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix utils)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (gnu packages)
   #:use-module (gnu packages base)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages glib)
@@ -48,7 +49,8 @@
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1ra0ii805w3rrs0qqbjxzl6i79ksz42lnvbglw18h4igkza21kzj"))))
+                "1ra0ii805w3rrs0qqbjxzl6i79ksz42lnvbglw18h4igkza21kzj"))
+              (patches (search-patches "dunst-1.7.3-fix-crash.patch"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; no check target
diff --git a/gnu/packages/patches/dunst-1.7.3-fix-crash.patch 
b/gnu/packages/patches/dunst-1.7.3-fix-crash.patch
new file mode 100644
index 0000000000..8b51d820a4
--- /dev/null
+++ b/gnu/packages/patches/dunst-1.7.3-fix-crash.patch
@@ -0,0 +1,21 @@
+Author: Danny Milosavljevic <dannym@scratchpost.org>
+Date: 2022-02-04 21:52:05 CET
+
+Fix crash if notification contains invalid pixbuf data.
+
+diff -ru 
/gnu/store/5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c
 5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c
+--- 
/gnu/store/5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c
        1970-01-01 01:00:01.000000000 +0100
++++ 5885czxhmhkckjqj939b0hd6b6czizwb-dunst-1.7.3-checkout/src/notification.c   
2022-02-04 19:05:57.534906600 +0100
+@@ -359,8 +359,10 @@
+         g_clear_pointer(&n->icon_id, g_free);
+ 
+         GdkPixbuf *icon = icon_get_for_data(new_icon, &n->icon_id, 
draw_get_scale());
+-        n->icon = gdk_pixbuf_to_cairo_surface(icon);
+-        g_object_unref(icon);
++        if (icon) {
++              n->icon = gdk_pixbuf_to_cairo_surface(icon);
++              g_object_unref(icon);
++        }
+ }
+ 
+ /* see notification.h */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]