asfdemux: Reset number of languages to 0 when freeing the array because of errors
authorSebastian Dröge <sebastian@centricular.com>
Mon, 30 Jan 2017 13:39:59 +0000 (15:39 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 30 Jan 2017 13:39:59 +0000 (15:39 +0200)
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

gst/asfdemux/gstasfdemux.c

index ea5158f..255a427 100644 (file)
@@ -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 */
   }
 }