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.
This commit is contained in:
Sebastian Dröge 2016-11-28 19:52:24 +02:00
parent fdf1a57953
commit 911a6083c8

View file

@ -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;