mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
mpegtspacketizer: Fix off-by-one error
This went un-noticed for 6 years :( The issue is that for short sections (without subtables and CRC), we would always fail when checking whether we had enough data or not and then default to the long section checking. Use the long section checking would then cause interesting side-effects for short sections (such as believing they were already seen and therefore would be dropped/ignored).
This commit is contained in:
parent
10d4c0c511
commit
878edacc05
1 changed files with 1 additions and 1 deletions
|
@ -1092,7 +1092,7 @@ section_start:
|
|||
GST_DEBUG ("Short packet");
|
||||
section_length = (GST_READ_UINT16_BE (data + 1) & 0xfff) + 3;
|
||||
/* Only do fast-path if we have enough byte */
|
||||
if (section_length < packet->data_end - data) {
|
||||
if (data + section_length <= packet->data_end) {
|
||||
if ((section =
|
||||
gst_mpegts_section_new (packet->pid, g_memdup (data,
|
||||
section_length), section_length))) {
|
||||
|
|
Loading…
Reference in a new issue