summaryrefslogtreecommitdiff
path: root/gst-libs/gst/mpegts
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-11-28 19:52:24 +0200
committerSebastian Dröge <sebastian@centricular.com>2016-11-28 19:53:46 +0200
commit911a6083c838ec3cddfb6f7011636fbb8e268451 (patch)
tree2d169fb1544dfd63ed039b30b74e19ca80f65645 /gst-libs/gst/mpegts
parentfdf1a57953a8e9f411180a1fe3d6e67bad669049 (diff)
downloadgstreamer-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/gst/mpegts')
-rw-r--r--gst-libs/gst/mpegts/gstmpegtssection.c5
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;