[soundconverter] Fix crash in markup_escape (calling glib markup_escape_text) caused by file names with invalid encod
Michael Schwendt
mschwendt at fedoraproject.org
Sat Jul 2 17:19:02 UTC 2011
commit 5cfe98afb9e27f89140658fcadbeabd98190cac7
Author: Michael Schwendt <mschwendt at fedoraproject.org>
Date: Sat Jul 2 19:18:47 2011 +0200
Fix crash in markup_escape (calling glib markup_escape_text)
caused by file names with invalid encodings (#718334).
soundconverter-1.5.4-markup_escape_text.patch | 16 ++++++++++++++++
soundconverter.spec | 9 ++++++++-
2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/soundconverter-1.5.4-markup_escape_text.patch b/soundconverter-1.5.4-markup_escape_text.patch
new file mode 100644
index 0000000..4298848
--- /dev/null
+++ b/soundconverter-1.5.4-markup_escape_text.patch
@@ -0,0 +1,16 @@
+diff -Nur soundconverter-1.5.4-orig/src/soundconverter.py soundconverter-1.5.4/src/soundconverter.py
+--- soundconverter-1.5.4-orig/src/soundconverter.py 2011-01-06 21:47:14.000000000 +0100
++++ soundconverter-1.5.4/src/soundconverter.py 2011-07-02 19:10:33.886850612 +0200
+@@ -384,7 +384,11 @@
+ return tag
+
+ def markup_escape(message):
+- return gobject.markup_escape_text(message)
++ try:
++ _um = message.encode('utf-8')
++ except UnicodeDecodeError:
++ _um = repr(message)
++ return gobject.markup_escape_text(_um)
+
+ def __filename_escape(str):
+ return str.replace("'","\'").replace("\"","\\\"").replace('!','\\!')
diff --git a/soundconverter.spec b/soundconverter.spec
index 9010e58..439c03a 100644
--- a/soundconverter.spec
+++ b/soundconverter.spec
@@ -1,6 +1,6 @@
Name: soundconverter
Version: 1.5.4
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Simple sound converter application for GNOME
Group: Applications/Multimedia
@@ -21,6 +21,8 @@ BuildRequires: gnome-python2-gnome
Patch0: soundconverter-1.5.3-bz647336.patch
# Fedora bz 714454
Patch1: soundconverter-1.5.4-gst-profile-lang.patch
+# Fedora bz 718334, glib2 markup_escape_text wants utf-8, else segfaults
+Patch2: soundconverter-1.5.4-markup_escape_text.patch
# enforce availability of this and its requirement "desktop-notification-daemon"
Requires: notify-python
@@ -47,6 +49,7 @@ writes anything the GStreamer library can.
# see Patch0
#patch0 -p1 -b .bz647336
%patch1 -p1 -b .bz714454
+%patch2 -p1 -b .bz718334
%build
%configure --disable-dependency-tracking
@@ -99,6 +102,10 @@ update-desktop-database &> /dev/null ||:
%changelog
+* Sat Jul 2 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.4-5
+- Fix crash in markup_escape (calling glib markup_escape_text)
+ caused by file names with invalid encodings (#718334).
+
* Tue Jun 21 2011 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.4-4
- Fix crash when GNOME Audio Profile description changes translation (#714454).
More information about the scm-commits
mailing list