diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2016-11-28 19:52:24 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-11-28 19:53:46 +0200 |
commit | 911a6083c838ec3cddfb6f7011636fbb8e268451 (patch) | |
tree | 2d169fb1544dfd63ed039b30b74e19ca80f65645 /gst-libs | |
parent | fdf1a57953a8e9f411180a1fe3d6e67bad669049 (diff) | |
download | gstreamer-plugins-bad-911a6083c838ec3cddfb6f7011636fbb8e268451.tar.gz |
mpegtssection: Don't assert if the given section length is longer than the PMT actually is
Instead error out cleanly and just assert that we didn't read more than
the available data.
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/mpegts/gstmpegtssection.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c index cc5e21b2a..02038a76a 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.c +++ b/gst-libs/gst/mpegts/gstmpegtssection.c @@ -715,6 +715,11 @@ _parse_pmt (GstMpegtsSection * section) i += 1; } + /* Section length was longer than the actual content of the PMT */ + if (data <= end - 4) + goto error; + + /* Ensure we did not read after the end of our array */ g_assert (data == end - 4); return (gpointer) pmt; |