diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-10-04 04:29:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-28 20:27:41 +0100 |
commit | b8129b1a7ab959cf2822e43377084d884d791058 (patch) | |
tree | 9162a28099d80f469c81ac9176120fa86a645891 | |
parent | 7128f67c3f2024b2fd6eb6ad80ea212f855a7929 (diff) | |
download | ffmpeg-b8129b1a7ab959cf2822e43377084d884d791058.tar.gz |
avformat/mpegts: Check desc_len / get8() return code
Fixes out of array read
Fixes: signal_sigsegv_844d59_10_signal_sigsegv_a17bb7_366_mpegts_mpeg2video_mp2_dvbsub_topfield.rec
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c3d7f00ee3e09801f56f25db8b5961f25e842bd2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mpegts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 33e618c058..c3045d9237 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -769,7 +769,7 @@ static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len break; desc_len = get8(&p, desc_list_end); desc_end = p + desc_len; - if (desc_end > desc_list_end) + if (desc_len < 0 || desc_end > desc_list_end) break; #ifdef DEBUG_SI av_log(ts->stream, AV_LOG_DEBUG, "tag: 0x%02x len=%d\n", |