[Pkg-mpd-commits] [gkrellm-gkrellmpc] 04/07: Add a crash fix patch.
Andrey Rahmatullin
wrar-guest at moszumanska.debian.org
Sun Nov 20 16:57:43 UTC 2016
This is an automated email from the git hooks/post-receive script.
wrar-guest pushed a commit to annotated tag debian/0.1_beta10-4
in repository gkrellm-gkrellmpc.
commit 08bb978812aca3d4d7562084c849f842d8062845
Author: Andrey Rakhmatullin <wrar at wrar.name>
Date: Sun Nov 20 21:51:57 2016 +0500
Add a crash fix patch.
---
debian/patches/fix-crash.patch | 29 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 30 insertions(+)
diff --git a/debian/patches/fix-crash.patch b/debian/patches/fix-crash.patch
new file mode 100644
index 0000000..905e578
--- /dev/null
+++ b/debian/patches/fix-crash.patch
@@ -0,0 +1,29 @@
+From e95e865dbc7b068dc51b175da98e2ea6e72c6ff4 Mon Sep 17 00:00:00 2001
+From: Simon Marchi <simon.marchi at polymtl.ca>
+Date: Sun, 21 Jul 2013 23:54:15 -0400
+Subject: [PATCH] Fix: Add NULL check in mpc_addlist_update
+
+The code assumes that either "directory" or "file" will be present in
+the hash table, but MPD returns "playlist" entries as well. This fix
+avoids crashing by ignoring entries that are not "directory" or "file".
+
+Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
+---
+ addlist.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/addlist.c b/addlist.c
+index a232b05..fabe791 100644
+--- a/addlist.c
++++ b/addlist.c
+@@ -327,6 +327,10 @@ gboolean mpc_addlist_update(void) {
+ file = g_hash_table_lookup(hash, "file");
+ directory = g_hash_table_lookup(hash, "directory");
+
++ if (!file && ! directory) {
++ continue;
++ }
++
+ /* Update parentiter */
+ if (directory) {
+
diff --git a/debian/patches/series b/debian/patches/series
index 5bb9f21..6331884 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ fix-makefile-install.patch
fix-makefile-flags.patch
fix-fd-leak.patch
fix-memleaks.patch
+fix-crash.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/gkrellm-gkrellmpc.git
More information about the Pkg-mpd-commits
mailing list