[easytag] Avoid crash saving files with unknown image types

David King amigadave at fedoraproject.org
Sat Mar 8 00:20:18 UTC 2014


commit f980c677fbefd2fb2843d16b0f037054554c9ff3
Author: David King <amigadave at amigadave.com>
Date:   Sat Mar 8 00:15:51 2014 +0000

    Avoid crash saving files with unknown image types
    
    Also, avoid a crash when loading filenames from a text file.

 easytag-2.1.10-avoid-load-text-file-crash.patch    |   25 ++++++++++++++++++++
 ...tag-2.1.10-avoid-unknown-image-save-crash.patch |   23 ++++++++++++++++++
 easytag.spec                                       |   11 +++++++-
 3 files changed, 57 insertions(+), 2 deletions(-)
---
diff --git a/easytag-2.1.10-avoid-load-text-file-crash.patch b/easytag-2.1.10-avoid-load-text-file-crash.patch
new file mode 100644
index 0000000..9af2806
--- /dev/null
+++ b/easytag-2.1.10-avoid-load-text-file-crash.patch
@@ -0,0 +1,25 @@
+From e0c7574ef2ea5a6a3cc8ff92bd03d72d3f73e739 Mon Sep 17 00:00:00 2001
+From: David King <amigadave at amigadave.com>
+Date: Fri, 07 Mar 2014 23:15:06 +0000
+Subject: Fix load from text file dialogue response
+
+Avoid an assert by fixing the accepted response types to include those
+given at construction.
+
+https://retrace.fedoraproject.org/faf/problems/1581387/
+---
+diff --git a/src/misc.c b/src/misc.c
+index af68db0..721b081 100644
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -2724,7 +2724,7 @@ void Open_Load_Filename_Window (void)
+                                                       GTK_STOCK_CLOSE,
+                                                       GTK_RESPONSE_CANCEL,
+                                                       GTK_STOCK_APPLY,
+-                                                      GTK_RESPONSE_ACCEPT,
++                                                      GTK_RESPONSE_APPLY,
+                                                       NULL);
+     gtk_dialog_set_default_response (GTK_DIALOG (LoadFilenameWindow),
+                                      GTK_RESPONSE_ACCEPT);
+--
+cgit v0.9.2
diff --git a/easytag-2.1.10-avoid-unknown-image-save-crash.patch b/easytag-2.1.10-avoid-unknown-image-save-crash.patch
new file mode 100644
index 0000000..fd7e7c7
--- /dev/null
+++ b/easytag-2.1.10-avoid-unknown-image-save-crash.patch
@@ -0,0 +1,23 @@
+From 6563a0989a6d35d618a950262bd81d2ac50ed0ed Mon Sep 17 00:00:00 2001
+From: David King <amigadave at amigadave.com>
+Date: Fri, 07 Mar 2014 22:41:43 +0000
+Subject: Avoid crash when saving unknown image types
+
+https://retrace.fedoraproject.org/faf/problems/1586225/
+---
+diff --git a/src/picture.c b/src/picture.c
+index b6b8f26..8e74b93 100644
+--- a/src/picture.c
++++ b/src/picture.c
+@@ -988,7 +988,8 @@ const gchar *Picture_Mime_Type_String (Picture_Format format)
+         case PICTURE_FORMAT_PNG:
+             return "image/png";
+         default:
+-            return NULL;
++            g_debug ("%s", "Unrecognised image MIME type");
++            return "application/octet-stream";
+     }
+ }
+ 
+--
+cgit v0.9.2
diff --git a/easytag.spec b/easytag.spec
index 7a529bc..404cbcd 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.10
-Release: 3%{?dist}
+Release: 4%{?dist}
 # Program is GPL only the included libapetag is LGPL
 License: GPLv2+ and LGPLv2+
 Group: Applications/Multimedia
@@ -9,6 +9,8 @@ URL: https://wiki.gnome.org/Apps/EasyTAG
 Source: http://download.gnome.org/sources/easytag/2.1/easytag-%{version}.tar.xz
 Patch0: easytag-2.1.10-avoid-close-button-crash.patch
 Patch1: easytag-2.1.10-avoid-decline-deleting-file-crash.patch
+Patch2: easytag-2.1.10-avoid-unknown-image-save-crash.patch
+Patch3: easytag-2.1.10-avoid-load-text-file-crash.patch
 BuildRequires: appdata-tools
 BuildRequires: desktop-file-utils
 BuildRequires: docbook-dtds
@@ -34,7 +36,8 @@ MP2, FLAC, Ogg Vorbis, MusePack and Monkey's Audio files.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-
+%patch2 -p1
+%patch3 -p1
 
 %build
 %configure
@@ -75,6 +78,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Sat Mar 08 2014 David King <amigadave at amigadave.com> 2.1.10-4
+- Avoid crash when saving files with unknown image types
+- Avoid crash when loading filenames from a text file
+
 * Fri Mar 07 2014 David King <amigadave at amigadave.com> 2.1.10-3
 - Avoid crash when declining deletion of a file
 


More information about the scm-commits mailing list