[easytag/f19] Apply several post-release bugfixes

David King amigadave at fedoraproject.org
Fri Feb 7 15:20:34 UTC 2014


commit a406ab45c47562e9cb5f13c3fecf72afce53c8be
Author: David King <amigadave at amigadave.com>
Date:   Mon Jan 20 15:27:20 2014 +0000

    Apply several post-release bugfixes
    
    - Avoid crash while saving Vorbis tags
    - Avoid crash when receiving invalid commandline arguments
    - Avoid double unref of GFile in open handler
    - Fix memory leak in log date formatting
    - Fix memory leak in date parsing

 easytag-2.1.9-avoid-double-gfile-unref.patch     |   20 ++++++++++++
 easytag-2.1.9-avoid-invalid-argument-crash.patch |   35 ++++++++++++++++++++++
 easytag-2.1.9-avoid-vorbis-save-crash.patch      |   27 +++++++++++++++++
 easytag-2.1.9-fix-log-format-date-leak.patch     |   21 +++++++++++++
 easytag-2.1.9-fix-parse-date-leak.patch          |   18 +++++++++++
 easytag.spec                                     |   19 +++++++++++-
 6 files changed, 139 insertions(+), 1 deletions(-)
---
diff --git a/easytag-2.1.9-avoid-double-gfile-unref.patch b/easytag-2.1.9-avoid-double-gfile-unref.patch
new file mode 100644
index 0000000..a1c75ec
--- /dev/null
+++ b/easytag-2.1.9-avoid-double-gfile-unref.patch
@@ -0,0 +1,20 @@
+commit 6c70f15269bd66936b2e7d65e62c8a80bc38fc9f
+Author: David King <amigadave at amigadave.com>
+Date:   Thu Feb 6 22:56:09 2014 +0000
+
+    Do not unref GFile in GApplication::open handler
+    
+    https://retrace.fedoraproject.org/faf/problems/1504917/
+
+diff --git a/src/easytag.c b/src/easytag.c
+index 8dc6824..1559aac 100644
+--- a/src/easytag.c
++++ b/src/easytag.c
+@@ -449,7 +449,6 @@ on_application_open (GApplication *application, GFile **files, gint n_files,
+         case G_FILE_TYPE_REGULAR:
+             /* When given a file, load the parent directory. */
+             parent = g_file_get_parent (arg);
+-            g_object_unref (arg);
+ 
+             if (parent)
+             {
diff --git a/easytag-2.1.9-avoid-invalid-argument-crash.patch b/easytag-2.1.9-avoid-invalid-argument-crash.patch
new file mode 100644
index 0000000..8acd87f
--- /dev/null
+++ b/easytag-2.1.9-avoid-invalid-argument-crash.patch
@@ -0,0 +1,35 @@
+commit c01a3ee46ca0b8e35fafa5008d5b6ef5e8e66592
+Author: David King <amigadave at amigadave.com>
+Date:   Thu Feb 6 22:32:11 2014 +0000
+
+    Avoid a crash when handling invalid arguments
+    
+    Do not try to dereference a NULL ETCore pointer.
+
+diff --git a/src/et_core.c b/src/et_core.c
+index 3ba6191..e34de86 100644
+--- a/src/et_core.c
++++ b/src/et_core.c
+@@ -269,14 +269,15 @@ void ET_Core_Free (void)
+     ET_Core_Initialize();
+ }
+ 
+-void ET_Core_Destroy (void)
++void
++ET_Core_Destroy (void)
+ {
+-    // Free attached data
+-    ET_Core_Free();
+-
+-    // Unallocate
+-    g_free(ETCore);
+-    ETCore = NULL;
++    if (ETCore)
++    {
++        ET_Core_Free ();
++        g_free (ETCore);
++        ETCore = NULL;
++    }
+ }
+ 
+ 
diff --git a/easytag-2.1.9-avoid-vorbis-save-crash.patch b/easytag-2.1.9-avoid-vorbis-save-crash.patch
new file mode 100644
index 0000000..3f10bbd
--- /dev/null
+++ b/easytag-2.1.9-avoid-vorbis-save-crash.patch
@@ -0,0 +1,27 @@
+From dd4f3bd815bd186e3e58752e0ac7999c6c645fd7 Mon Sep 17 00:00:00 2001
+From: David King <amigadave at amigadave.com>
+Date: Sun, 19 Jan 2014 09:26:57 +0000
+Subject: Check for failure of g_output_stream_write_all()
+
+Flip an incorrect check for the return value of
+g_output_stream_write_all() when svaing Vorbis tags. Fixes bug 722522.
+---
+diff --git a/src/vcedit.c b/src/vcedit.c
+index 12e7b00..bf083d9 100644
+--- a/src/vcedit.c
++++ b/src/vcedit.c
+@@ -566,9 +566,9 @@ vcedit_write(vcedit_state *state, GFile *file, GError **error)
+                 goto cleanup;
+             }
+ 
+-            if (g_output_stream_write_all (G_OUTPUT_STREAM (ostream),
+-                                           ogout.body, ogout.body_len,
+-                                           &bytes_written, NULL, error))
++            if (!g_output_stream_write_all (G_OUTPUT_STREAM (ostream),
++                                            ogout.body, ogout.body_len,
++                                            &bytes_written, NULL, error))
+             {
+                 g_debug ("Only %" G_GSIZE_FORMAT " bytes out of %ld bytes of "
+                          "data were written", bytes_written, ogout.body_len);
+--
+cgit v0.9.2
diff --git a/easytag-2.1.9-fix-log-format-date-leak.patch b/easytag-2.1.9-fix-log-format-date-leak.patch
new file mode 100644
index 0000000..1b0c88c
--- /dev/null
+++ b/easytag-2.1.9-fix-log-format-date-leak.patch
@@ -0,0 +1,21 @@
+From afad898b0394b6eafeaf6f89cf411ac5c0e96ab0 Mon Sep 17 00:00:00 2001
+From: David King <amigadave at amigadave.com>
+Date: Tue, 21 Jan 2014 19:42:09 +0000
+Subject: Fix memory leak in Log_Format_Date()
+
+---
+diff --git a/src/log.c b/src/log.c
+index 577fb63..1ab65f0 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -231,6 +231,8 @@ Log_Format_Date (void)
+     /* Time without date in current locale. */
+     time = g_date_time_format (dt, "%X");
+ 
++    g_date_time_unref (dt);
++
+     return time;
+ }
+ 
+--
+cgit v0.9.2
diff --git a/easytag-2.1.9-fix-parse-date-leak.patch b/easytag-2.1.9-fix-parse-date-leak.patch
new file mode 100644
index 0000000..e5285ba
--- /dev/null
+++ b/easytag-2.1.9-fix-parse-date-leak.patch
@@ -0,0 +1,18 @@
+commit 1d0a255ca85d964141945a29f6e92d2ba0d89714
+Author: David King <amigadave at amigadave.com>
+Date:   Mon Feb 3 22:30:28 2014 +0000
+
+    Fix memory leak in Parse_Date()
+
+diff --git a/src/misc.c b/src/misc.c
+index a9a922c..48a1199 100644
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -441,6 +441,7 @@ gboolean Parse_Date (void)
+     {
+         dt = g_date_time_new_now_local ();
+         current_year = g_date_time_format (dt, "%Y");
++        g_date_time_unref (dt);
+ 
+         tmp = &current_year[4-strlen(year)];
+         if ( atoi(year) <= atoi(tmp) )
diff --git a/easytag.spec b/easytag.spec
index 9b57a3a..dda55f8 100644
--- a/easytag.spec
+++ b/easytag.spec
@@ -1,7 +1,7 @@
 Summary: Tag editor for mp3, ogg, flac and other music files
 Name: easytag
 Version: 2.1.9
-Release: 1%{?dist}
+Release: 2%{?dist}
 # Program is GPL only the included libapetag is LGPL
 License: GPLv2+ and LGPLv2+
 Group: Applications/Multimedia
@@ -9,6 +9,11 @@ URL: https://wiki.gnome.org/Apps/EasyTAG
 Source: http://download.gnome.org/sources/easytag/2.1/easytag-%{version}.tar.xz
 # License clarification, applied upstream after 2.1.9 was released.
 Patch0: easytag-clarify-dlm-license.patch
+Patch1: easytag-2.1.9-avoid-vorbis-save-crash.patch
+Patch2: easytag-2.1.9-avoid-invalid-argument-crash.patch
+Patch3: easytag-2.1.9-avoid-double-gfile-unref.patch
+Patch4: easytag-2.1.9-fix-log-format-date-leak.patch
+Patch5: easytag-2.1.9-fix-parse-date-leak.patch
 BuildRequires: desktop-file-utils
 BuildRequires: docbook-dtds
 BuildRequires: docbook-style-xsl
@@ -32,6 +37,11 @@ MP2, FLAC, Ogg Vorbis, MusePack and Monkey's Audio files.
 %prep
 %setup -q
 %patch0 -p1 -b .dlm
+%patch1 -p1 -b .vorbis
+%patch2 -p1 -b .argument
+%patch3 -p1 -b .gfile
+%patch4 -p1 -b .log
+%patch5 -p1 -b .parse
 
 
 %build
@@ -72,6 +82,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Fri Feb 07 2014 David King <amigadave at amigadave.com> 2.1.9-2
+- Avoid crash while saving Vorbis tags
+- Avoid crash when receiving invalid commandline arguments
+- Avoid double unref of GFile in open handler
+- Fix memory leak in log date formatting
+- Fix memory leak in date parsing
+
 * Fri Jan 17 2014 David King <amigadave at amigadave.com> 2.1.9-1
 - Update to 2.1.9 (#1051759)
 


More information about the scm-commits mailing list