From: Tim-Philipp Müller Date: Mon, 18 Dec 2006 12:27:32 +0000 (+0000) Subject: gst/qtdemux/qtdemux.c: Fix crash dereferencing NULL pointer if there's no stco atom. X-Git-Tag: 1.19.3~507^2~21271 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1891c3240bdbe7846caea6474ec6be2e0b2b737e;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/ChangeLog b/ChangeLog index 91a0797..5914324 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-18 Tim-Philipp Müller + + * gst/qtdemux/qtdemux.c: (qtdemux_parse_trak): + Fix crash dereferencing NULL pointer if there's no stco atom. + Fixes #387122. + 2006-12-18 Jan Schmidt * ext/wavpack/gstwavpackenc.h: 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)