diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2008-01-04 21:05:57 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2008-01-04 21:05:57 +0000 |
commit | b2f5af9a8285c3c960bc1e8618e1c0f349a63cb1 (patch) | |
tree | 76e123785e7c95943d443af919312fd0166a837d /packages/gnome-mplayer | |
parent | 1d6f1d20590fd91fb800156d9c16afb551a28c16 (diff) |
gnome-mplayer: Fix segfaults decoding non-utf8 tags in media.
Diffstat (limited to 'packages/gnome-mplayer')
4 files changed, 52 insertions, 4 deletions
diff --git a/packages/gnome-mplayer/files/non-utf8-id3-fallback.patch b/packages/gnome-mplayer/files/non-utf8-id3-fallback.patch new file mode 100644 index 0000000000..3b13bf0015 --- /dev/null +++ b/packages/gnome-mplayer/files/non-utf8-id3-fallback.patch @@ -0,0 +1,22 @@ +I found that on ARM/glibc 2.5/glib 2.12.something test in strip_unicode() doesn't +really catch invalid utf-8 chars. Also, let's tell user where problem lies straight. + +Paul Sokolovsky <pmiscml@gmail.com> +--- a/src/thread.c.org 2007-12-24 00:10:15.000000000 +0200 ++++ a/src/thread.c 2008-01-04 22:04:30.000000000 +0200 +@@ -349,13 +349,11 @@ + //g_idle_add(set_media_info, idledata); + utf8name = g_locale_to_utf8(parse[name],-1, NULL, NULL,NULL); + if (utf8name == NULL) { +- strip_unicode(parse[name],strlen(parse[name])); +- utf8name = g_strdup(parse[name]); ++ utf8name = g_strdup("<cannot convert to utf-8>"); + } + utf8artist = g_locale_to_utf8(parse[artist],-1, NULL, NULL,NULL); + if (utf8artist == NULL) { +- strip_unicode(parse[artist],strlen(parse[artist])); +- utf8artist = g_strdup(parse[artist]); ++ utf8artist = g_strdup("<cannot convert to utf-8>"); + } + + message = g_markup_printf_escaped(_("<small>\n<b>Title:</b>\t%s\n<b>Artist:</b>\t%s\n<b>File:</b>\t%s\n</small>"),utf8name,utf8artist,idledata->info); diff --git a/packages/gnome-mplayer/files/uchar-for-utf8-check.patch b/packages/gnome-mplayer/files/uchar-for-utf8-check.patch new file mode 100644 index 0000000000..f19d20716e --- /dev/null +++ b/packages/gnome-mplayer/files/uchar-for-utf8-check.patch @@ -0,0 +1,22 @@ +--- a/src/support.c.org 2007-12-18 20:39:09.000000000 +0200 ++++ a/src/support.c 2008-01-04 22:12:32.000000000 +0200 +@@ -24,7 +24,7 @@ + + #include "support.h" + +-void strip_unicode(gchar * data, gsize len) ++void strip_unicode(guchar * data, gsize len) + { + gsize i = 0; + +--- a/src/support.h.org 2007-12-17 18:21:46.000000000 +0200 ++++ a/src/support.h 2008-01-04 22:24:15.000000000 +0200 +@@ -31,7 +31,7 @@ + #include <stdlib.h> + #include <unistd.h> + +-void strip_unicode(gchar * data, gsize len); ++void strip_unicode(guchar * data, gsize len); + gint play_file(gchar * filename, gint playlist); + gint detect_playlist(gchar * filename); + gint parse_playlist(gchar * filename); diff --git a/packages/gnome-mplayer/gnome-mplayer_0.5.3.bb b/packages/gnome-mplayer/gnome-mplayer_0.5.3.bb index 62533441c7..c01152cfb8 100644 --- a/packages/gnome-mplayer/gnome-mplayer_0.5.3.bb +++ b/packages/gnome-mplayer/gnome-mplayer_0.5.3.bb @@ -3,10 +3,12 @@ HOMEPAGE = "http://dekorte.homeip.net/download/gnome-mplayer/" LICENSE = "GPL" DEPENDS = "gtk+ gconf dbus-glib" RDEPENDS = "mplayer" -PR = "r2" +PR = "r3" inherit autotools pkgconfig gconf SRC_URI = "http://dekorte.homeip.net/download/${PN}/${P}.tar.gz \ file://ac-gthread.patch;patch=1 \ - file://1.patch;patch=1" + file://1.patch;patch=1 \ + file://uchar-for-utf8-check.patch;patch=1 \ + file://non-utf8-id3-fallback.patch;patch=1" diff --git a/packages/gnome-mplayer/gnome-mplayer_cvs.bb b/packages/gnome-mplayer/gnome-mplayer_cvs.bb index ce0c445048..fe9daabfa0 100644 --- a/packages/gnome-mplayer/gnome-mplayer_cvs.bb +++ b/packages/gnome-mplayer/gnome-mplayer_cvs.bb @@ -5,7 +5,7 @@ DEPENDS = "gtk+ gconf dbus-glib" RDEPENDS = "mplayer" SRCDATE = "20080101" PV = "0.5.3+cvs${SRCDATE}" -PR = "r2" +PR = "r3" inherit autotools pkgconfig gconf @@ -13,4 +13,6 @@ S = "${WORKDIR}/${PN}" SRC_URI = "cvs://anonymous@dekorte.homeip.net/data/cvs;module=${PN} \ file://ac-gthread.patch;patch=1 \ - file://1.patch;patch=1" + file://1.patch;patch=1 \ + file://uchar-for-utf8-check.patch;patch=1 \ + file://non-utf8-id3-fallback.patch;patch=1" |