summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-01-30 15:39:59 +0200
committerSebastian Dröge <sebastian@centricular.com>2017-01-30 15:39:59 +0200
commitdec880031d16f1ee4919a36f49298419246cf6a8 (patch)
treefd283d1a562b6646dab4cd649b8bc2e58f8acad7
parentbf8835a7df97269d73c06c6d9316249c3896bf9a (diff)
asfdemux: Reset number of languages to 0 when freeing the array because of errors
Otherwise we will happily index into the array at NULL if the requested index is smaller than the number of languages that were previously allocated. https://bugzilla.gnome.org/show_bug.cgi?id=777937
-rw-r--r--gst/asfdemux/gstasfdemux.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index ea5158f8..255a427f 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -3962,6 +3962,7 @@ not_enough_data:
GST_WARNING_OBJECT (demux, "short read parsing language list object!");
g_free (demux->languages);
demux->languages = NULL;
+ demux->num_languages = 0;
return GST_FLOW_OK; /* not fatal */
}
}