summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2018-11-17 22:50:24 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2018-11-17 23:00:04 +0100
commit0e02b5efb750155e16b77d0af5c637c01611a014 (patch)
tree8a835ff2547c103e2502ffd4b167ee7c8fb7960b /media-sound/audacious/files/audacious-3.10-dbus-crash.patch
parentmedia-plugins/audacious-plugins: Assuming qtaudio should be enabled (diff)
downloadgentoo-0e02b5efb750155e16b77d0af5c637c01611a014.tar.gz
gentoo-0e02b5efb750155e16b77d0af5c637c01611a014.tar.bz2
gentoo-0e02b5efb750155e16b77d0af5c637c01611a014.zip
media-sound/audacious: 3.10 version bump
Bug: https://bugs.gentoo.org/640672 Package-Manager: Portage-2.3.51, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-sound/audacious/files/audacious-3.10-dbus-crash.patch')
-rw-r--r--media-sound/audacious/files/audacious-3.10-dbus-crash.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/media-sound/audacious/files/audacious-3.10-dbus-crash.patch b/media-sound/audacious/files/audacious-3.10-dbus-crash.patch
new file mode 100644
index 000000000000..83b9c74f98cc
--- /dev/null
+++ b/media-sound/audacious/files/audacious-3.10-dbus-crash.patch
@@ -0,0 +1,60 @@
+From 1528e780825b1fc49639ea16d332c5752051dab7 Mon Sep 17 00:00:00 2001
+From: John Lindgren <john@jlindgren.net>
+Date: Sun, 19 Aug 2018 14:12:30 -0400
+Subject: [PATCH] Fix crash when an invalid field name is sent via D-Bus.
+ Closes: #817.
+
+Regression introduced by commit 203b41f8e249.
+---
+ src/audacious/dbus-server.cc | 31 +++++++++++++++++--------------
+ 1 file changed, 17 insertions(+), 14 deletions(-)
+
+diff --git a/src/audacious/dbus-server.cc b/src/audacious/dbus-server.cc
+index 7602ace22..20a6c5839 100644
+--- a/src/audacious/dbus-server.cc
++++ b/src/audacious/dbus-server.cc
+@@ -635,27 +635,30 @@ static gboolean do_song_title (Obj * obj, Invoc * invoc, unsigned pos)
+ static gboolean do_song_tuple (Obj * obj, Invoc * invoc, unsigned pos, const char * key)
+ {
+ Tuple::Field field = Tuple::field_by_name (key);
+- Tuple tuple;
+- GVariant * var;
++ GVariant * var = nullptr;
+
+ if (field >= 0)
+- tuple = CURRENT.entry_tuple (pos);
+-
+- switch (tuple.get_value_type (field))
+ {
+- case Tuple::String:
+- var = g_variant_new_string (tuple.get_str (field));
+- break;
++ Tuple tuple = CURRENT.entry_tuple (pos);
+
+- case Tuple::Int:
+- var = g_variant_new_int32 (tuple.get_int (field));
+- break;
++ switch (tuple.get_value_type (field))
++ {
++ case Tuple::String:
++ var = g_variant_new_string (tuple.get_str (field));
++ break;
+
+- default:
+- var = g_variant_new_string ("");
+- break;
++ case Tuple::Int:
++ var = g_variant_new_int32 (tuple.get_int (field));
++ break;
++
++ default:
++ break;
++ }
+ }
+
++ if (! var)
++ var = g_variant_new_string ("");
++
+ FINISH2 (song_tuple, g_variant_new_variant (var));
+ return true;
+ }