summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2006-12-18 12:27:32 +0000
committerTim-Philipp Müller <tim@centricular.net>2006-12-18 12:27:32 +0000
commit1891c3240bdbe7846caea6474ec6be2e0b2b737e (patch)
treeadc80384ad35a7d967288d39a04bc8ae7899bb06 /gst
parent3f787afe0224625066591dae5b37d7fd0eac01f8 (diff)
downloadgst-plugins-bad-1891c3240bdbe7846caea6474ec6be2e0b2b737e.tar.gz
gst-plugins-bad-1891c3240bdbe7846caea6474ec6be2e0b2b737e.tar.bz2
gst-plugins-bad-1891c3240bdbe7846caea6474ec6be2e0b2b737e.zip
gst/qtdemux/qtdemux.c: Fix crash dereferencing NULL pointer if there's no stco atom.
Original commit message from CVS: * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): Fix crash dereferencing NULL pointer if there's no stco atom. Fixes #387122.
Diffstat (limited to 'gst')
-rw-r--r--gst/qtdemux/qtdemux.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 7c3864fe..504e1cf8 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -3682,7 +3682,10 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
co64 = qtdemux_tree_get_child_by_type (stbl, FOURCC_co64);
if (stco == NULL && co64 == NULL)
goto corrupt_file;
- stco_data = (const guint8 *) stco->data;
+ if (stco)
+ stco_data = (const guint8 *) stco->data;
+ else
+ stco_data = NULL;
/* sample time */
stts = qtdemux_tree_get_child_by_type (stbl, FOURCC_stts);
if (stts == NULL)