diff options
author | Björn Axelsson <gecko@acc.umu.se> | 2009-04-12 02:19:40 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2009-04-12 02:19:40 +0000 |
commit | a4d2af9b96cc5715b9dc2fecb1c56435de93e49a (patch) | |
tree | d396337a995d038465401ccc72713bdcf1f5fcaf /libavformat/mpegts.c | |
parent | 2b97246ec282d0b8213259cc1013e086dc5b4fbb (diff) | |
download | ffmpeg-a4d2af9b96cc5715b9dc2fecb1c56435de93e49a.tar.gz |
Ok, ts demuxer is more complicated than I thought
Revert r18454 and fix correctly #700
Stop parsing if end of buffer is reached while reading
patch by Björn Axelsson, bjorn dot axelsson at intinor dot se
Originally committed as revision 18455 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 7468a023df..226f5b28cb 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -555,7 +555,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len if (desc_list_len < 0) break; desc_list_end = p + desc_list_len; - if (desc_list_end >= p_end) + if (desc_list_end > p_end) break; for(;;) { desc_tag = get8(&p, desc_list_end); @@ -571,6 +571,8 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } } desc_len = get8(&p, desc_list_end); + if (desc_len < 0) + break; desc_end = p + desc_len; if (desc_end > desc_list_end) break; |