Mercurial > libavformat.hg
changeset 4859:0929b70d4407 libavformat
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
author | bcoudurier |
---|---|
date | Sun, 12 Apr 2009 02:19:40 +0000 |
parents | 4273f83dec05 |
children | d14d1f5f4eb4 |
files | mpegts.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegts.c Sun Apr 12 01:37:34 2009 +0000 +++ b/mpegts.c Sun Apr 12 02:19:40 2009 +0000 @@ -555,7 +555,7 @@ 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 @@ } } desc_len = get8(&p, desc_list_end); + if (desc_len < 0) + break; desc_end = p + desc_len; if (desc_end > desc_list_end) break;