[Bug 730926] tags: expose ID3 private frame ("PRIV") data

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Sep 25 15:06:16 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=730926
  GStreamer | gst-plugins-base | git

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #286862|none                        |needs-work
             status|                            |

--- Comment #13 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2014-09-25 22:06:10 UTC ---
(From update of attachment 286862)

>+  owner_len = strlen ((gchar *) work->parse_data) + 1;

Running strlen() on untrusted data is not a good idea, since we can't specify a
max_length to search. What if there is no 0 in the data?

I think you should use memchr() here, and then also check that there's actually
any payload data in addition to the owner string.

>+  owner_data =
>+      gst_structure_new (work->frame_id, "owner", G_TYPE_STRING,
>+      work->parse_data, NULL);

Ok, but I think the structure name should be more expressive than just "PRIV",
I would suggest "ID3PrivateFrame". And I would call this owner_info instead of
owner_data, since "info" is the name/terminology used by gst_sample_new().

Rest looks fine, thanks for the update.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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