mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avformat/mpegts: Check program_info_length
Fixes: overread
No testcase
Found-by: Marton Balint
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1fd718c6a9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -2335,7 +2335,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
av_log(ts->stream, AV_LOG_TRACE, "pcr_pid=0x%x\n", pcr_pid);
|
||||
|
||||
program_info_length = get16(&p, p_end);
|
||||
if (program_info_length < 0)
|
||||
|
||||
if (program_info_length < 0 || (program_info_length & 0xFFF) > p_end - p)
|
||||
return;
|
||||
program_info_length &= 0xfff;
|
||||
while (program_info_length >= 2) {
|
||||
|
||||
Reference in New Issue
Block a user