id3v2: fix splitting strings in ISO-8859-1 and UTF-16 formats
authorThomas Bluemel <tbluemel@control4.com>
Wed, 24 Aug 2016 17:39:39 +0000 (11:39 -0600)
committerTim-Philipp Müller <tim@centricular.com>
Sun, 25 Dec 2016 10:52:39 +0000 (10:52 +0000)
commitcd101ce8f02b2aaee40dcdfb63a9b8794b897006
tree875a17d07f9587073974a5534feb62cccf7ccac2
parentda6070054f471216adac2c5879031fcebfa592d2
id3v2: fix splitting strings in ISO-8859-1 and UTF-16 formats

When parsing NUL-terminated strings, do not include the terminating
NUL byte(s).  Depending on the encoding used, either g_utf8_validate()
failed due to this, or worse the call to g_utf16_to_utf8() would
return 0 items read on an empty string, causing it to fail parsing
certain frames.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
gst-libs/gst/tag/id3v2frames.c