diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-08-06 22:09:07 +0100 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-08-06 22:09:07 +0100 |
commit | 5be02c29c6239586e40a5d3296001302b5d6ab1a (patch) | |
tree | 1b3eb8692ed800a2c6fa886dec26a051abb07d83 | |
parent | 785fb4931f9d50716810cb4cc2355133fb37b462 (diff) | |
download | xine-lib-5be02c29c6239586e40a5d3296001302b5d6ab1a.tar.gz xine-lib-5be02c29c6239586e40a5d3296001302b5d6ab1a.tar.bz2 |
Fix crashes with fuzzed Windows Media files.
--HG--
extra : transplant_source : %92%2C%CB%01S%25N%22%E1%00%FB%19%B0%CE5%1BU%F9%F6%0A
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/demuxers/demux_asf.c | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -10,6 +10,7 @@ xine-lib (1.1.15) 2008-??-?? - Delay preallocating video frames until we know how large they'll be - Only try and set the tuner if we're going to use it. Setting the tuner when using baseband video (CVBS, S-Video) breaks the input. + * Fix crashes with fuzzed Windows Media files. xine-lib (1.1.14) 2008-06-29 * DVB changes: diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 3af265ce4..3a0720043 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.c @@ -70,6 +70,7 @@ #define ASF_MODE_HTTP_REF 2 #define ASF_MODE_ASF_REF 3 #define ASF_MODE_ENCRYPTED_CONTENT 4 +#define ASF_MODE_NO_CONTENT 5 typedef struct { int seq; @@ -443,6 +444,14 @@ static int asf_read_header (demux_asf_t *this) { asf_stream_t *asf_stream = this->asf_header->streams[i]; asf_demux_stream_t *demux_stream = &this->streams[i]; + if (!asf_stream && this->mode != ASF_MODE_NO_CONTENT) { + xine_log(this->stream->xine, XINE_LOG_MSG, + _("demux_asf: warning: The stream id=%d appears to be missing.\n"), asf_stream->stream_number); + _x_message(this->stream, XINE_MSG_READ_ERROR, + _("Media stream missing?"), NULL); + this->mode = ASF_MODE_NO_CONTENT; + } + if (asf_stream->encrypted_flag) { if (this->mode != ASF_MODE_ENCRYPTED_CONTENT) { xine_log(this->stream->xine, XINE_LOG_MSG, @@ -1679,6 +1688,7 @@ static int demux_asf_send_chunk (demux_plugin_t *this_gen) { return demux_asf_parse_asf_references(this); case ASF_MODE_ENCRYPTED_CONTENT: + case ASF_MODE_NO_CONTENT: this->status = DEMUX_FINISHED; return this->status; |