From 96ffc18f7bbff7ff1b8f94b753b09a5813a1ae78 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Nov 25 2009 16:04:23 +0000 Subject: - Update to 2.28.1 - Fix crasher on double-free (#539848) --- diff --git a/.cvsignore b/.cvsignore index 14dd71c..4a7ccbc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -sound-juicer-2.28.0.tar.bz2 +sound-juicer-2.28.1.tar.bz2 diff --git a/0001-Fix-crasher-when-extracting-an-unknown-CD.patch b/0001-Fix-crasher-when-extracting-an-unknown-CD.patch deleted file mode 100644 index 62ce52b..0000000 --- a/0001-Fix-crasher-when-extracting-an-unknown-CD.patch +++ /dev/null @@ -1,42 +0,0 @@ -diff --git a/libjuicer/sj-metadata-gvfs.c b/libjuicer/sj-metadata-gvfs.c -index fc41d51..8ccdd4c 100644 ---- a/libjuicer/sj-metadata-gvfs.c -+++ b/libjuicer/sj-metadata-gvfs.c -@@ -76,7 +76,7 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error) - GFile *file = NULL; - GFileInfo *info; - GFileEnumerator *e; -- guint i = 0; -+ guint i = 1; - - g_return_val_if_fail (SJ_IS_METADATA_GVFS (metadata), NULL); - -@@ -119,11 +119,11 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error) - - for (info = g_file_enumerator_next_file (e, NULL, NULL) ; - info != NULL ; -- info = g_file_enumerator_next_file (e, NULL, NULL)) { -+ info = g_file_enumerator_next_file (e, NULL, NULL), i++) { - TrackDetails *track; - - track = g_new0 (TrackDetails, 1); -- track->number = i++; -+ track->number = i; - track->title = g_strdup (g_file_info_get_attribute_string (info, "xattr::org.gnome.audio.title")); - if (track->title == NULL) - track->title = g_strdup_printf (_("Track %d"), i); -diff --git a/libjuicer/sj-metadata-gvfs.c b/libjuicer/sj-metadata-gvfs.c -index 8ccdd4c..7389d7f 100644 ---- a/libjuicer/sj-metadata-gvfs.c -+++ b/libjuicer/sj-metadata-gvfs.c -@@ -124,6 +124,7 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error) - - track = g_new0 (TrackDetails, 1); - track->number = i; -+ track->album = album; - track->title = g_strdup (g_file_info_get_attribute_string (info, "xattr::org.gnome.audio.title")); - if (track->title == NULL) - track->title = g_strdup_printf (_("Track %d"), i); --- -1.6.5.rc2 - diff --git a/sj-gvfs-crash-fix.patch b/sj-gvfs-crash-fix.patch deleted file mode 100644 index 0e4cfa8..0000000 --- a/sj-gvfs-crash-fix.patch +++ /dev/null @@ -1,123 +0,0 @@ -diff --git a/libjuicer/sj-metadata-getter.c b/libjuicer/sj-metadata-getter.c -index 4a55ecd..9e5e6c9 100644 ---- a/libjuicer/sj-metadata-getter.c -+++ b/libjuicer/sj-metadata-getter.c -@@ -22,6 +22,7 @@ - - #include - #include -+#include "sj-structures.h" - #include "sj-metadata-getter.h" - #include "sj-metadata-marshal.h" - #include "sj-metadata.h" -@@ -155,11 +156,10 @@ sj_metadata_getter_set_proxy_port (SjMetadataGetter *mdg, const int proxy_port) - static gboolean - fire_signal_idle (SjMetadataGetterSignal *signal) - { -+ /* The callback is the sucker, and now owns the albums list */ - g_signal_emit_by_name (G_OBJECT (signal->mdg), "metadata", - signal->albums, signal->error); - -- /* This will kill the albums, as -- * those belong to the metadata backend */ - if (signal->metadata) - g_object_unref (signal->metadata); - if (signal->error != NULL) -diff --git a/libjuicer/sj-metadata-gvfs.c b/libjuicer/sj-metadata-gvfs.c -index 4e34470..fc41d51 100644 ---- a/libjuicer/sj-metadata-gvfs.c -+++ b/libjuicer/sj-metadata-gvfs.c -@@ -35,7 +35,6 @@ - struct SjMetadataGvfsPrivate { - char *cdrom; - char *uri; -- GList *albums; - }; - - #define GET_PRIVATE(o) \ -@@ -71,9 +70,10 @@ static GList * - gvfs_list_albums (SjMetadata *metadata, char **url, GError **error) - { - SjMetadataGvfsPrivate *priv; -+ GList *albums = NULL; - AlbumDetails *album; - GError *my_error = NULL; -- GFile *file; -+ GFile *file = NULL; - GFileInfo *info; - GFileEnumerator *e; - guint i = 0; -@@ -84,8 +84,7 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error) - - if (priv->uri == NULL) { - g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Cannot access CD")); -- priv->albums = NULL; -- return NULL; -+ goto bail; - } - - file = g_file_new_for_uri (priv->uri); -@@ -139,22 +138,21 @@ gvfs_list_albums (SjMetadata *metadata, char **url, GError **error) - } - g_object_unref (e); - -- priv->albums = g_list_append (NULL, album); -+ albums = g_list_append (albums, album); - -- return priv->albums; -+ return albums; - - bail: - -- g_object_unref (file); -- g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Cannot access CD: %s"), my_error->message); -- g_error_free (my_error); -- g_list_foreach (priv->albums, (GFunc)album_details_free, NULL); -- g_list_free (priv->albums); -- priv->albums = NULL; -+ if (file) -+ g_object_unref (file); -+ if (my_error) { -+ g_set_error (error, SJ_ERROR, SJ_ERROR_INTERNAL_ERROR, _("Cannot access CD: %s"), my_error->message); -+ g_error_free (my_error); -+ } - return NULL; - } - -- - /** - * GObject methods - */ -@@ -192,8 +190,7 @@ sj_metadata_gvfs_set_property (GObject *object, guint property_id, - - switch (property_id) { - case PROP_DEVICE: -- if (priv->cdrom) -- g_free (priv->cdrom); -+ g_free (priv->cdrom); - priv->cdrom = g_value_dup_string (value); - priv->uri = device_to_cdda_uri (priv->cdrom); - break; -@@ -212,8 +209,6 @@ sj_metadata_gvfs_finalize (GObject *object) - SjMetadataGvfsPrivate *priv = SJ_METADATA_GVFS (object)->priv; - g_free (priv->cdrom); - g_free (priv->uri); -- g_list_foreach (priv->albums, (GFunc)album_details_free, NULL); -- g_list_free (priv->albums); - } - - static void -diff --git a/src/sj-main.c b/src/sj-main.c -index e7a44ee..ac4fa12 100644 ---- a/src/sj-main.c -+++ b/src/sj-main.c -@@ -1070,7 +1070,8 @@ gboolean cd_drive_exists (const char *device) - monitor = brasero_medium_monitor_get_default (); - drive = brasero_medium_monitor_get_drive (monitor, device); - exists = (drive != NULL); -- g_object_unref (drive); -+ if (exists) -+ g_object_unref (drive); - - return exists; - } diff --git a/sound-juicer-2.28.0-use-gnome-session-inhibit.patch b/sound-juicer-2.28.0-use-gnome-session-inhibit.patch deleted file mode 100644 index 5bed9db..0000000 --- a/sound-juicer-2.28.0-use-gnome-session-inhibit.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff --git a/src/sj-extracting.c b/src/sj-extracting.c -index e44a589..b7118b1 100644 ---- a/src/sj-extracting.c -+++ b/src/sj-extracting.c -@@ -30,6 +30,7 @@ - #include - #include - #include -+#include - - #include - #include -@@ -821,7 +822,8 @@ on_extract_activate (GtkWidget *button, gpointer user_data) - } - - cookie = sj_inhibit (g_get_application_name (), -- _("Extracting audio from CD")); -+ _("Extracting audio from CD"), -+ GDK_WINDOW_XID(main_window->window)); - - /* Save the genre */ - save_genre (genre_entry); -diff --git a/src/sj-inhibit.c b/src/sj-inhibit.c -index 7fc60e0..fc804d2 100644 ---- a/src/sj-inhibit.c -+++ b/src/sj-inhibit.c -@@ -26,13 +26,13 @@ - #include "sj-inhibit.h" - - /* PowerManagent defines */ --#define PM_DBUS_SERVICE "org.freedesktop.PowerManagement" --#define PM_DBUS_INHIBIT_PATH "/org/freedesktop/PowerManagement/Inhibit" --#define PM_DBUS_INHIBIT_INTERFACE "org.freedesktop.PowerManagement.Inhibit" -+#define PM_DBUS_SERVICE "org.gnome.SessionManager" -+#define PM_DBUS_INHIBIT_PATH "/org/gnome/SessionManager" -+#define PM_DBUS_INHIBIT_INTERFACE "org.gnome.SessionManager" - - /** cookie is returned as an unsigned integer */ - guint --sj_inhibit (const gchar * appname, const gchar * reason) -+sj_inhibit (const gchar * appname, const gchar * reason, guint xid) - { - gboolean res; - guint cookie; -@@ -60,8 +60,10 @@ sj_inhibit (const gchar * appname, const gchar * reason) - - res = dbus_g_proxy_call (proxy, - "Inhibit", &error, -- G_TYPE_STRING, appname, -+ G_TYPE_STRING, appname, /* app-id */ -+ G_TYPE_UINT, xid, - G_TYPE_STRING, reason, -+ G_TYPE_UINT, 4+8, /* flags, inhibit being marked idle and allowing suspend */ - G_TYPE_INVALID, - G_TYPE_UINT, &cookie, - G_TYPE_INVALID); -@@ -116,7 +118,7 @@ sj_uninhibit (guint cookie) - } - - res = dbus_g_proxy_call (proxy, -- "UnInhibit", -+ "Uninhibit", - &error, - G_TYPE_UINT, cookie, - G_TYPE_INVALID, -@@ -124,7 +126,7 @@ sj_uninhibit (guint cookie) - - /* check the return value */ - if (!res) { -- g_warning ("UnInhibit method failed"); -+ g_warning ("Uninhibit method failed"); - } - - /* check the error value */ -diff --git a/src/sj-inhibit.h b/src/sj-inhibit.h -index b93fbf9..3498cfe 100644 ---- a/src/sj-inhibit.h -+++ b/src/sj-inhibit.h -@@ -25,7 +25,7 @@ - - #include - --guint sj_inhibit (const gchar * appname, const gchar * reason); -+guint sj_inhibit (const gchar * appname, const gchar * reason, guint xid); - void sj_uninhibit (guint cookie); - - #endif /* SJ_INHIBIT_H */ diff --git a/sound-juicer.spec b/sound-juicer.spec index d042888..4f46e0d 100644 --- a/sound-juicer.spec +++ b/sound-juicer.spec @@ -7,8 +7,8 @@ Name: sound-juicer Summary: Clean and lean CD ripper -Version: 2.28.0 -Release: 4%{?dist} +Version: 2.28.1 +Release: 1%{?dist} License: GPLv2+ Group: Applications/Multimedia Source: http://download.gnome.org/sources/sound-juicer/2.28/%{name}-%{version}.tar.bz2 @@ -40,10 +40,6 @@ BuildRequires: gnome-common BuildRequires: automake autoconf libtool BuildRequires: desktop-file-utils -# already upstream, bfc60ae0bc2e8e41a234f4017600088b22af13d6 -Patch0: sound-juicer-2.28.0-use-gnome-session-inhibit.patch -Patch1: 0001-Fix-crasher-when-extracting-an-unknown-CD.patch - ExcludeArch: s390 s390x %description @@ -51,8 +47,6 @@ GStreamer-based CD ripping tool. Saves audio CDs to Ogg/vorbis. %prep %setup -q -%patch0 -p1 -b .inhibit-gnome-session -%patch1 -p1 -b .gvfs %build # work around a gstreamer problem where it @@ -131,6 +125,10 @@ fi %{_mandir}/man1/* %changelog +* Wed Nov 25 2009 Bastien Nocera 2.28.1-1 +- Update to 2.28.1 +- Fix crasher on double-free (#539848) + * Tue Oct 27 2009 Bastien Nocera 2.28.0-4 - Fix crasher when extracting a CD that's not in musicbrainz (#528297) diff --git a/sources b/sources index 78adde3..8d18b9d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2bfad5d8c76d7f684bedf0346bcaefb6 sound-juicer-2.28.0.tar.bz2 +680c036ca9b062fe198fada30edbf534 sound-juicer-2.28.1.tar.bz2