[Bug 724464] mpegts: does not check data sizes when parsing descriptors
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Feb 20 23:01:51 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=724464
GStreamer | gst-plugins-bad | git
--- Comment #6 from Edward Hervey <bilboed at bilboed.com> 2014-02-21 07:22:29 UTC ---
I'm thinking about something like this, which would reduce code, yet still
checks for API arguments.
(gstmpegts-private.h)
#define __common_desc_checks(desc, tagtype, minlen) \
((desc)->data != NULL && (desc)->tag == (tagtype) && (desc)->length >=
(minlen))
#define __common_desc_checks_exact(desc, tagtype, len) \
((desc)->data != NULL && (desc)->tag == (tagtype) && (desc)->length == (len))
(gstmpegtsdescriptor.c)
gboolean
gst_mpegts_descriptor_parse_iso_639_language (const GstMpegTsDescriptor *
descriptor, GstMpegTsISO639LanguageDescriptor * res)
...
g_return_val_if_fail (descriptor != NULL && res != NULL, FALSE);
if (!__common_desc_checks(descriptor, 0x0A, 0))
return FALSE;
--
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