diff --git a/ChangeLog b/ChangeLog index 01c28e048e..5fecd16671 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-01-07 Benjamin Otte + + * ext/mad/gstid3tag.c: (gst_mad_id3_to_tag_list): + Add guard against invalid utf-8 conversions in mad. Just in case. + 2004-01-07 Benjamin Otte * sys/oss/gstosssink.c: (gst_osssink_sink_fixate): diff --git a/ext/mad/gstid3tag.c b/ext/mad/gstid3tag.c index 7f40c93644..d656df6d88 100644 --- a/ext/mad/gstid3tag.c +++ b/ext/mad/gstid3tag.c @@ -468,6 +468,12 @@ gst_mad_id3_to_tag_list(const struct id3_tag *tag) utf8 = id3_ucs4_utf8duplicate(ucs4); if (utf8 == 0) continue; + + if (!g_utf8_validate (utf8, -1, NULL)) { + g_warning ("converted string is not valid utf-8"); + free (utf8); + continue; + } /* be sure to add non-string tags here */ switch (gst_tag_get_type (tag_name)) {