summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-10-23 10:48:17 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-10-23 10:48:17 +0000
commit2004c046663828bcb6e81504c4645c9dffcbf521 (patch)
treeb3484b3694fe2aeab9df7afd3248e0794a83ad02
parent40703dea6c6e5b3be113fe5cdfa619396d6d008b (diff)
downloadxine-lib-2004c046663828bcb6e81504c4645c9dffcbf521.tar.gz
xine-lib-2004c046663828bcb6e81504c4645c9dffcbf521.tar.bz2
Sanity check the qt file, before we try to open it. The qt demuxer was
allocating huge amounts of memory, when an .avi file was to be identified by content. CVS patchset: 2961 CVS date: 2002/10/23 10:48:17
-rw-r--r--src/demuxers/demux_qt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 334a837aa..49de24215 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -30,7 +30,7 @@
* build_frame_table
* free_qt_info
*
- * $Id: demux_qt.c,v 1.98 2002/10/23 04:58:15 tmmm Exp $
+ * $Id: demux_qt.c,v 1.99 2002/10/23 10:48:17 jkeil Exp $
*
*/
@@ -1927,6 +1927,10 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
case METHOD_BY_CONTENT:
+ if (!is_qt_file(this->input)) {
+ free (this);
+ return NULL;
+ }
if ((this->qt = create_qt_info()) == NULL) {
free (this);
return NULL;
@@ -1957,6 +1961,10 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
return NULL;
}
+ if (!is_qt_file(this->input)) {
+ free (this);
+ return NULL;
+ }
if ((this->qt = create_qt_info()) == NULL) {
free (this);
return NULL;