Mercurial > mplayer.hg
changeset 36446:af0a7a216a2c
Fix potential endless loop while probing.
author | reimar |
---|---|
date | Wed, 11 Dec 2013 20:03:02 +0000 |
parents | 9bda4bc47a46 |
children | 740a60d26cc0 |
files | libmpdemux/demux_mpg.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_mpg.c Mon Dec 09 14:11:16 2013 +0000 +++ b/libmpdemux/demux_mpg.c Wed Dec 11 20:03:02 2013 +0000 @@ -84,6 +84,8 @@ es_map_len = stream_read_word(demux->stream); //length of elementary streams map es_map_len = FFMIN(es_map_len, len - prog_len - 8); //sanity check while(es_map_len > 0) { + if (demux->stream->eof) + return 0; type = stream_read_char(demux->stream); id = stream_read_char(demux->stream); if(id >= 0xB0 && id <= 0xEF && priv) {