[Bug 770355] New: id3v2: Fix parsing extended header and string lists

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Aug 24 22:11:09 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=770355

            Bug ID: 770355
           Summary: id3v2: Fix parsing extended header and string lists
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: gstblub at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I found two bugs trying to play a MP3 file with a IDv3 header:

1. First it would not create a tag list at all even though the file definitely
contained IDv3 tags.  It turned out that it also had an extended header. 
According to the IDv3 spec, the extended header size field excludes itself,
meaning it specifies the size of the extended header after this field.  Adding
4 bytes to this value fixed the offset to the first tag as expected.

2. Once #1 was fixed, the file failed parsing a COMM tag that was encoded using
UTF16.  The parse_split_strings() function normally splits the data at \0
characters, but when adding the strings to the array with
parse_insert_string_field(), it would include that null character as part of
the length.  In the case of UTF-16 this completely broke when encountering an
empty string (with or without BOM(s)), because we called g_utf16_to_utf8() with
a size of 1 (which was the splitting null character) and it returned n_read of
0, causing it to fail parsing the entire ID3v2 header.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list