From ef691f38271deb6aa5e33bff792d7f9b66de3402 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 18 Dec 2006 12:27:32 +0000 Subject: [PATCH] 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. --- gst/qtdemux/qtdemux.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index 7c3864f..504e1cf 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) -- 2.7.4